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>2014-04-22 10:40:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-22 10:40:17 +0400
commit551096d6fd414510c4d726d0dae2f9703cb440d9 (patch)
tree8f237e5942954d9da1bea04d69792d751dc52b77 /source/blender/blenkernel/intern/packedFile.c
parent1b523b54e680d1b0bc8c7c978f8f5cf2e5b1a64e (diff)
BLI_open: check returned value for `-1` instead of `< 0`
Diffstat (limited to 'source/blender/blenkernel/intern/packedFile.c')
-rw-r--r--source/blender/blenkernel/intern/packedFile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 71504bb9fbe..fc8a23a7782 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -202,7 +202,7 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename, const char
* and create a PackedFile structure */
file = BLI_open(name, O_BINARY | O_RDONLY, 0);
- if (file < 0) {
+ if (file == -1) {
BKE_reportf(reports, RPT_ERROR, "Unable to pack file, source path '%s' not found", name);
}
else {
@@ -331,7 +331,7 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i
BLI_make_existing_file(name);
file = BLI_open(name, O_BINARY + O_WRONLY + O_CREAT + O_TRUNC, 0666);
- if (file < 0) {
+ if (file == -1) {
BKE_reportf(reports, RPT_ERROR, "Error creating file '%s'", name);
ret_value = RET_ERROR;
}
@@ -394,7 +394,7 @@ int checkPackedFile(const char *filename, PackedFile *pf)
/* we'll have to compare the two... */
file = BLI_open(name, O_BINARY | O_RDONLY, 0);
- if (file < 0) {
+ if (file == -1) {
ret_val = PF_NOFILE;
}
else {