diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-22 10:40:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-22 10:40:17 +0400 |
commit | 551096d6fd414510c4d726d0dae2f9703cb440d9 (patch) | |
tree | 8f237e5942954d9da1bea04d69792d751dc52b77 /source/blender/blenloader/intern/runtime.c | |
parent | 1b523b54e680d1b0bc8c7c978f8f5cf2e5b1a64e (diff) |
BLI_open: check returned value for `-1` instead of `< 0`
Diffstat (limited to 'source/blender/blenloader/intern/runtime.c')
-rw-r--r-- | source/blender/blenloader/intern/runtime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/runtime.c b/source/blender/blenloader/intern/runtime.c index ca9f2faf998..d6fd2f92443 100644 --- a/source/blender/blenloader/intern/runtime.c +++ b/source/blender/blenloader/intern/runtime.c @@ -72,7 +72,7 @@ int BLO_is_a_runtime(const char *path) int datastart; char buf[8]; - if (fd < 0) + if (fd == -1) goto cleanup; lseek(fd, -12, SEEK_END); @@ -104,7 +104,7 @@ BlendFileData *BLO_read_runtime(const char *path, ReportList *reports) fd = BLI_open(path, O_BINARY | O_RDONLY, 0); - if (fd < 0) { + if (fd == -1) { BKE_reportf(reports, RPT_ERROR, "Unable to open '%s': %s", path, strerror(errno)); goto cleanup; } |