From: Jeremy Allison Date: Tue, 21 Jul 2020 00:02:15 +0000 (-0700) Subject: s3: libsmb: Cleanup - use helper 'ok' bool for resolve_hosts(). X-Git-Tag: talloc-2.3.2~965 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4e430635ec7bfb79dce93bded562dc8c5e17b5f;p=thirdparty%2Fsamba.git s3: libsmb: Cleanup - use helper 'ok' bool for resolve_hosts(). No logic change. Signed-off-by: Jeremy Allison Reviewed-by: Isaac Boukris --- diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 5d4b1ee545f..2ad01f0eb99 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -2593,6 +2593,7 @@ NTSTATUS internal_resolve_name(const char *name, const char *tok; NTSTATUS status = NT_STATUS_UNSUCCESSFUL; int i; + bool ok; TALLOC_CTX *frame = NULL; *return_iplist = NULL; @@ -2680,9 +2681,10 @@ NTSTATUS internal_resolve_name(const char *name, if (!NT_STATUS_IS_OK(status)) { continue; } - if (!convert_ss2service(return_iplist, + ok = convert_ss2service(return_iplist, ss_list, - return_count)) { + return_count); + if (!ok) { status = NT_STATUS_NO_MEMORY; goto fail; }