]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Use struct initialization
authorVolker Lendecke <vl@samba.org>
Wed, 26 Jul 2023 14:49:24 +0000 (16:49 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 14 Aug 2023 19:53:37 +0000 (19:53 +0000)
Avoid an explicit ZERO_STRUCT

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smbXsrv_tcon.c

index 5749bf184bc03cc36f4e98b4ed409ae6370df562..5c6a701c2ef872f7b3a03fce5e9644f7225af615 100644 (file)
@@ -1015,7 +1015,7 @@ static int smbXsrv_tcon_disconnect_all_callback(struct db_record *local_rec,
 static NTSTATUS smbXsrv_tcon_disconnect_all(struct smbXsrv_tcon_table *table,
                                            uint64_t vuid)
 {
-       struct smbXsrv_tcon_disconnect_all_state state;
+       struct smbXsrv_tcon_disconnect_all_state state = { .vuid = vuid };
        NTSTATUS status;
        int count = 0;
 
@@ -1023,9 +1023,6 @@ static NTSTATUS smbXsrv_tcon_disconnect_all(struct smbXsrv_tcon_table *table,
                return NT_STATUS_OK;
        }
 
-       ZERO_STRUCT(state);
-       state.vuid = vuid;
-
        status = dbwrap_traverse(table->local.db_ctx,
                                 smbXsrv_tcon_disconnect_all_callback,
                                 &state, &count);