]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_servers: Remove unused variables
authorVolker Lendecke <vl@samba.org>
Thu, 7 Jan 2021 19:53:17 +0000 (20:53 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 11 Jan 2021 13:19:32 +0000 (13:19 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
source3/printing/spoolssd.c
source3/rpc_server/lsasd.c
source3/rpc_server/mdssd.c

index 8da1a7e392dfeca59e5062957f264b653dc8d9e3..8aef363fa91c7e315b989cce03e049691c8da563 100644 (file)
@@ -585,7 +585,6 @@ static NTSTATUS spoolssd_create_sockets(struct tevent_context *ev_ctx,
                size_t *pnum_listen_fds)
 {
        NTSTATUS status;
-       int fd = -1;
        int rc;
        enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();
        size_t i, num_fds;
@@ -640,10 +639,6 @@ static NTSTATUS spoolssd_create_sockets(struct tevent_context *ev_ctx,
 
        status = NT_STATUS_OK;
 done:
-       if (fd != -1) {
-               close(fd);
-       }
-
        return status;
 }
 
index b63de38991a5a3ac32bf0e2429af59ace1c285ae..a5cc1dad17d13ce2341a58bf3f7dd3c7dc98da5e 100644 (file)
@@ -550,7 +550,6 @@ static NTSTATUS lsasd_create_sockets(struct tevent_context *ev_ctx,
                                     size_t *pnum_listen_fds)
 {
        NTSTATUS status;
-       int fd = -1;
        size_t i, num_fds;
        struct pf_listen_fd *fds = NULL;
        int rc;
@@ -601,9 +600,6 @@ static NTSTATUS lsasd_create_sockets(struct tevent_context *ev_ctx,
 
        status = NT_STATUS_OK;
 done:
-       if (fd != -1) {
-               close(fd);
-       }
        return status;
 }
 
index 62448577b9d56df6cacd9d938c06c6f6c9c634c0..0c44b010aaed346080420f229ff0be53a28edab8 100644 (file)
@@ -500,7 +500,6 @@ static NTSTATUS mdssd_create_sockets(struct tevent_context *ev_ctx,
                                     size_t *pnum_listen_fds)
 {
        NTSTATUS status;
-       int fd = -1;
        size_t i, num_fds;
        struct pf_listen_fd *fds = NULL;
        int rc;
@@ -551,9 +550,6 @@ static NTSTATUS mdssd_create_sockets(struct tevent_context *ev_ctx,
 
        status = NT_STATUS_OK;
 done:
-       if (fd != -1) {
-               close(fd);
-       }
        return status;
 }