Fix clang warnings about braces in initialization

This commit is contained in:
dmiller 2026-04-20 15:21:53 +00:00
parent 782f59634e
commit f6eef1796a
4 changed files with 6 additions and 6 deletions

View file

@ -131,7 +131,7 @@ struct addrset {
/* Special node pointer to represent "all possible addresses"
* This will be used to represent netmask specifications. */
static struct trie_node g_TRIE_NODE_TRUE = {0};
static struct trie_node g_TRIE_NODE_TRUE = {{0}, {0}, NULL, NULL};
#define TRIE_NODE_TRUE &g_TRIE_NODE_TRUE
struct addrset *addrset_new()

View file

@ -308,7 +308,7 @@ static int ip_send (lua_State *L)
struct sockaddr_storage *nexthop;
struct route_nfo route;
u8 dstmac[6];
eth_nfo eth = {0};
eth_nfo eth = {};
if (!nmap_route_dst(&dst, &route))
return nseU_safeerror(L, "Can't find route to %s", addr);

View file

@ -2191,7 +2191,7 @@ void ultrascan_port_probe_update(UltraScanInfo *USI, HostScanStats *hss,
static void sendNextScanProbe(UltraScanInfo *USI, HostScanStats *hss) {
probespec pspec;
tryno_t tryno = {0};
tryno_t tryno = {};
if (get_next_target_probe(USI, hss, &pspec) == -1) {
fatal("%s: No more probes! Error in Nmap.", __func__);
@ -2224,7 +2224,7 @@ static void sendNextRetryStackProbe(UltraScanInfo *USI, HostScanStats *hss) {
pspec_tries = hss->retry_stack_tries.back();
hss->retry_stack_tries.pop_back();
tryno_t tryno = {0};
tryno_t tryno = {};
tryno.fields.seqnum = pspec_tries + 1;
if (pspec.type == PS_CONNECTTCP)
@ -2286,7 +2286,7 @@ static void doAnyRetryStackRetransmits(UltraScanInfo *USI) {
checked that sending is OK w/congestion control and that pingprobe is
available */
static void sendPingProbe(UltraScanInfo *USI, HostScanStats *hss) {
tryno_t tryno = {0};
tryno_t tryno = {};
tryno.fields.isPing = 1;
tryno.fields.seqnum = hss->nextPingSeq();

View file

@ -328,7 +328,7 @@ static bool tcp_probe_match(const UltraScanInfo *USI, const UltraProbe *probe,
const struct sockaddr_storage *src, const struct sockaddr_storage *dst,
u32 ipid) {
const struct probespec_tcpdata *probedata;
tryno_t tryno = {0};
tryno_t tryno = {};
bool goodseq;
// If magic port is *not* set, then tryno is in the source port, and we