From: Jeremy Allison Date: Tue, 21 Jul 2020 00:56:48 +0000 (-0700) Subject: s3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast(). X-Git-Tag: talloc-2.3.2~948 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaea3c0a62ba6fa942d22fb7506e201de9076977;p=thirdparty%2Fsamba.git s3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast(). No logic changes. Signed-off-by: Jeremy Allison Reviewed-by: Isaac Boukris --- diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c index 12abb734c2d..b4ebc90bf49 100644 --- a/source3/libsmb/libsmb_dir.c +++ b/source3/libsmb/libsmb_dir.c @@ -606,8 +606,11 @@ SMBC_opendir_ctx(SMBCCTX *context, */ ip_list = NULL; - status = name_resolve_bcast(MSBROWSE, 1, talloc_tos(), - &ip_list, &count); + status = name_resolve_bcast(talloc_tos(), + MSBROWSE, + 1, + &ip_list, + &count); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index cf40b4a0511..827fb209cbe 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -1909,9 +1909,9 @@ NTSTATUS name_resolve_bcast_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } -NTSTATUS name_resolve_bcast(const char *name, +NTSTATUS name_resolve_bcast(TALLOC_CTX *mem_ctx, + const char *name, int name_type, - TALLOC_CTX *mem_ctx, struct sockaddr_storage **return_iplist, int *return_count) { @@ -2763,9 +2763,9 @@ NTSTATUS internal_resolve_name(const char *name, } else if (strequal(tok, "bcast")) { struct sockaddr_storage *ss_list = NULL; status = name_resolve_bcast( + talloc_tos(), name, name_type, - talloc_tos(), &ss_list, return_count); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/libsmb/namequery.h b/source3/libsmb/namequery.h index 7e31dc1b632..aedb043ac81 100644 --- a/source3/libsmb/namequery.h +++ b/source3/libsmb/namequery.h @@ -68,9 +68,9 @@ struct tevent_req *name_resolve_bcast_send(TALLOC_CTX *mem_ctx, NTSTATUS name_resolve_bcast_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct sockaddr_storage **addrs, int *num_addrs); -NTSTATUS name_resolve_bcast(const char *name, +NTSTATUS name_resolve_bcast(TALLOC_CTX *mem_ctx, + const char *name, int name_type, - TALLOC_CTX *mem_ctx, struct sockaddr_storage **return_iplist, int *return_count); struct tevent_req *resolve_wins_send(TALLOC_CTX *mem_ctx, diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index c74b6497a35..2f50c5c8f5a 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -171,9 +171,11 @@ static bool query_one(const char *lookup, unsigned int lookup_type) &bcast_addr, talloc_tos(), &ip_list, &count, &flags); } else { - status = name_resolve_bcast( - lookup, lookup_type, - talloc_tos(), &ip_list, &count); + status = name_resolve_bcast(talloc_tos(), + lookup, + lookup_type, + &ip_list, + &count); } if (!NT_STATUS_IS_OK(status)) {