Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-04 21:30:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-04 21:30:47 +0400
commitd2dbc0b85eccd5989286c063b94f78f18992d3df (patch)
tree6f731bc07b271fba8922d3fce61e3fdc462eacda /source/blender/blenkernel/intern/image.c
parentaa43a978c187e6f9e941279f7393cdc2eb399212 (diff)
more consistent use of checks of BLI_open(), check 'fd < 0' rather then -1. packedfile incorrectly treated 0 as an error value. best not be vague/sloppy with this.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 1a444d497a0..63d0df76a6f 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -597,7 +597,8 @@ Image *BKE_image_load(Main *bmain, const char *filepath)
/* exists? */
file = BLI_open(str, O_BINARY | O_RDONLY, 0);
- if (file == -1) return NULL;
+ if (file < 0)
+ return NULL;
close(file);
/* create a short library name */