]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast().
authorJeremy Allison <jra@samba.org>
Tue, 21 Jul 2020 00:56:48 +0000 (17:56 -0700)
committerIsaac Boukris <iboukris@sn-devel-184>
Tue, 4 Aug 2020 08:51:42 +0000 (08:51 +0000)
No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
source3/libsmb/libsmb_dir.c
source3/libsmb/namequery.c
source3/libsmb/namequery.h
source3/utils/nmblookup.c

index 12abb734c2df797bd9ed7c33f71d6092dcdb2d16..b4ebc90bf49bf2122785b5a16bae1f0b34a3eaa5 100644 (file)
@@ -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))
                {
 
index cf40b4a051197b6fa70abc5cbb5988877efc8faa..827fb209cbe3e22a6b9fe20d83e4591824e867ff 100644 (file)
@@ -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)) {
index 7e31dc1b6329ce41c359acfc1ef28a834f21b7f3..aedb043ac810d2f687ab3f1fd01f099d3bf149fe 100644 (file)
@@ -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,
index c74b6497a3544453768c40fc04f4c0c37fe879a7..2f50c5c8f5a8ac28633ba19ab505f6b12ca60075 100644 (file)
@@ -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)) {