From: Volker Lendecke Date: Mon, 19 Feb 2024 08:57:16 +0000 (+0100) Subject: smbd: Avoid a ZERO_STRUCT() with direct struct initialization X-Git-Tag: tdb-1.4.11~1479 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=072cb98e4326c4124c649e911970acbf004f16bb;p=thirdparty%2Fsamba.git smbd: Avoid a ZERO_STRUCT() with direct struct initialization Signed-off-by: Volker Lendecke Reviewed-by: Andrew Bartlett Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Tue Mar 12 14:33:14 UTC 2024 on atb-devel-224 --- diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 9f8dce684bc..f32397d9353 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -1291,7 +1291,7 @@ void ctdbd_unregister_ips(struct ctdbd_connection *conn, void *private_data), void *private_data) { - struct ctdb_connection p; + struct ctdb_connection p = {}; TDB_DATA data = { .dptr = (uint8_t *)&p, .dsize = sizeof(p) }; int ret; struct sockaddr_storage client; @@ -1304,7 +1304,6 @@ void ctdbd_unregister_ips(struct ctdbd_connection *conn, smbd_ctdb_canonicalize_ip(_client, &client); smbd_ctdb_canonicalize_ip(_server, &server); - ZERO_STRUCT(p); switch (client.ss_family) { case AF_INET: memcpy(&p.dst.ip, &server, sizeof(p.dst.ip));