diff options
author | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2008-10-24 10:26:56 -0400 |
---|---|---|
committer | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2008-10-24 10:31:31 -0400 |
commit | 2a76f4d8c832155253be971975b0ac50649c7515 (patch) | |
tree | fea2c822698e63a77f8527aaa1721e3eef055166 /source3 | |
parent | f7692d16e3dc5e580364852c709c6c4a371dd32e (diff) | |
download | samba-2a76f4d8c832155253be971975b0ac50649c7515.tar.gz samba-2a76f4d8c832155253be971975b0ac50649c7515.tar.bz2 samba-2a76f4d8c832155253be971975b0ac50649c7515.zip |
Error return is False, not -1
- There were a few places in SMBC_getatr() that returned -1 instead of a
boolean. -1 was intended to mean error, but that's what False is for, and
the usages of this function assume that it returns a boolean with False as
the error condition.
Derrell
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/libsmb_file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c index 7b287096c2..ece056db87 100644 --- a/source3/libsmb/libsmb_file.c +++ b/source3/libsmb/libsmb_file.c @@ -518,7 +518,7 @@ SMBC_getatr(SMBCCTX * context, errno = EINVAL; TALLOC_FREE(frame); - return -1; + return False; } /* path fixup for . and .. */ @@ -527,14 +527,14 @@ SMBC_getatr(SMBCCTX * context, if (!fixedpath) { errno = ENOMEM; TALLOC_FREE(frame); - return -1; + return False; } } else { fixedpath = talloc_strdup(frame, path); if (!fixedpath) { errno = ENOMEM; TALLOC_FREE(frame); - return -1; + return False; } trim_string(fixedpath, NULL, "\\.."); trim_string(fixedpath, NULL, "\\."); |