]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: remove unused dns_port variable from smbd_open_socket_for_ip()
authorStefan Metzmacher <metze@samba.org>
Thu, 3 Apr 2025 12:33:14 +0000 (14:33 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 18 Apr 2025 10:17:29 +0000 (10:17 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/server.c

index 4eee7e70b361ff362d30ca5a6e7dd613ec28af81..abd53e23c0503d4e520b1b39d704b0360f227fdf 100644 (file)
@@ -1567,7 +1567,6 @@ static bool smbd_open_socket_for_ip(struct smbd_parent_context *parent,
 {
        int j;
        const char **ports;
-       unsigned dns_port = 0;
        TALLOC_CTX *ctx;
        bool status = true;
 
@@ -1584,13 +1583,6 @@ static bool smbd_open_socket_for_ip(struct smbd_parent_context *parent,
        for (j = 0; ports && ports[j]; j++) {
                unsigned port = atoi(ports[j]);
 
-               /* Keep the first port for mDNS service
-                * registration.
-                */
-               if (dns_port == 0) {
-                       dns_port = port;
-               }
-
                if (!smbd_open_one_socket(parent,
                                          ev_ctx,
                                          ifss,