From 496802fde92a54729d08755c9562ef7fb322a375 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Fri, 24 Oct 2008 11:19:12 -0400 Subject: [PATCH] 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. - per Jelmer's request, use false vs. False in new code, even if not making changes globally. Derrell (cherry picked from commit 89e22a2c969ab7a38016d4a145feb061fa6ae108) --- source/libsmb/libsmb_file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/libsmb/libsmb_file.c b/source/libsmb/libsmb_file.c index 7b287096c21..e162aaa16b7 100644 --- a/source/libsmb/libsmb_file.c +++ b/source/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, "\\."); -- 2.11.4.GIT