From d5592fe254c7061ca8bbcea93b6098dc9bf3d683 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 26 Dec 2009 20:23:13 +0000 Subject: fixes for errors/warnings found with cppcheck --- source/blender/blenlib/intern/fileops.c | 2 +- source/blender/blenlib/intern/storage.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 15277c438f4..ae20eda5a59 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -159,7 +159,7 @@ int BLI_gzip(char *from, char *to) { file = open(from,O_BINARY|O_RDONLY); - if ( -1 == file ) return -2; + if (file < 0) return -2; while ( 1 ) { diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index c830e5fc2c8..09bca168e64 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -440,7 +440,7 @@ int BLI_filepathsize(const char *path) { int size, file = open(path, O_BINARY|O_RDONLY); - if (file <= 0) + if (file < 0) return -1; size = BLI_filesize(file); -- cgit v1.2.3