diff options
author | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2009-02-14 09:41:55 -0500 |
---|---|---|
committer | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2009-02-14 09:44:36 -0500 |
commit | c2661aec24f244c1cf94dca02592b3410b9b6f31 (patch) | |
tree | d033295718eb097e857efceb3a5c9f0615c69025 /source3 | |
parent | 352c97561e9de6ccd0102859d18ed15913042622 (diff) | |
download | samba-c2661aec24f244c1cf94dca02592b3410b9b6f31.tar.gz samba-c2661aec24f244c1cf94dca02592b3410b9b6f31.tar.bz2 samba-c2661aec24f244c1cf94dca02592b3410b9b6f31.zip |
Check for the right error return value
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/libsmb_stat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c index d589f7ef71..3eec15f6bd 100644 --- a/source3/libsmb/libsmb_stat.c +++ b/source3/libsmb/libsmb_stat.c @@ -323,13 +323,14 @@ SMBC_statvfs_ctx(SMBCCTX *context, /* Is it a file or a directory? */ if (S_ISDIR(statbuf.st_mode)) { /* It's a directory. */ - if ((pFile = SMBC_opendir_ctx(context, path)) < 0) { + if ((pFile = SMBC_opendir_ctx(context, path)) == NULL) { return -1; } bIsDir = true; } else if (S_ISREG(statbuf.st_mode)) { /* It's a file. */ - if ((pFile = SMBC_open_ctx(context, path, O_RDONLY, 0)) < 0) { + if ((pFile = SMBC_open_ctx(context, path, + O_RDONLY, 0)) == NULL) { return -1; } bIsDir = false; |