summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-03-17 17:47:17 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2018-03-17 17:47:17 +0100
commitff49c01d42b66baf1ce67fea60eb2431c2bf6f97 (patch)
treef4b6d1f291378a2de98f909297c41d6afed7afda
parent4f605c32e616fadb1126f20e9a8ec59b19ebd8c9 (diff)
src/ntfs_udl.c: Check open() return value against -1 instead of >= 0
-rw-r--r--src/ntfs_udl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ntfs_udl.c b/src/ntfs_udl.c
index 37d0a50..4fec49a 100644
--- a/src/ntfs_udl.c
+++ b/src/ntfs_udl.c
@@ -816,7 +816,7 @@ static int open_file(const char *pathname)
{
int fh;
fh=open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
- if(fh>=0 || errno!=ENOENT)
+ if(fh != -1 || errno!=ENOENT)
return fh;
mkdir_local_for_file(pathname);
return open(pathname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);