diff options
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/runtime.c | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 2 |
2 files changed, 3 insertions, 3 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; } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index b4f7332dd1a..71e490d777e 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -3469,7 +3469,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL BLI_snprintf(tempname, sizeof(tempname), "%s@", filepath); file = BLI_open(tempname, O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666); - if (file < 0) { + if (file == -1) { BKE_reportf(reports, RPT_ERROR, "Cannot open file %s for writing: %s", tempname, strerror(errno)); return 0; } |