1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3: libsmbclient: Fix return value if cli_open() fails

Returning -1 in a function with bool as return value type is the same
as returning true. Change to false to indicate the error.

Detected by the help of cppcheck.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Rikard Falkeborn 2019-05-16 21:03:42 +02:00 committed by Jeremy Allison
parent 3a4f23636d
commit 730037504d

View File

@ -619,7 +619,7 @@ SMBC_setatr(SMBCCTX * context, SMBCSRV *srv, char *path,
if (!NT_STATUS_IS_OK(cli_open(srv->cli, path, O_RDWR, DENY_NONE, &fd))) {
errno = SMBC_errno(context, srv->cli);
TALLOC_FREE(frame);
return -1;
return False;
}
/* Set the new attributes */