Avoid semicolon after do{}while(0) macro definition

This commit is contained in:
dmiller 2026-07-15 23:35:13 +00:00
parent 10cada944b
commit 4233de2df1
4 changed files with 4 additions and 4 deletions

View file

@ -171,7 +171,7 @@ struct ip6_ext_hdr {
ip6->ip6_nxt = (nxt); ip6->ip6_hlim = (hlim); \
memmove(&ip6->ip6_src, &(src), IP6_ADDR_LEN); \
memmove(&ip6->ip6_dst, &(dst), IP6_ADDR_LEN); \
} while (0);
} while (0)
__BEGIN_DECLS
char *ip6_ntop(const ip6_addr_t *ip6, char *dst, size_t size);

View file

@ -3134,7 +3134,7 @@ pcap_t *my_pcap_open_live(const char *device, int snaplen, int promisc, int to_m
pcap_close(p_t);\
return NULL;\
}\
} while(0);
} while(0)
MY_PCAP_SET(pcap_set_snaplen, pt, snaplen);
MY_PCAP_SET(pcap_set_promisc, pt, promisc);

View file

@ -220,7 +220,7 @@ void uri_init(struct uri *uri)
#define FREE_AND_NULL(_FreeFunc, _P) do { \
_FreeFunc(_P); \
_P = NULL; \
} while (0);
} while (0)
void uri_free(struct uri *uri)
{

View file

@ -81,7 +81,7 @@
if (strlen(_Source) > sizeof((_Sock)->un.sun_path) - 1) \
bye("Socket path length is too long. Max: %lu", sizeof((_Sock)->un.sun_path) - 1); \
strncpy((_Sock)->un.sun_path, _Source, sizeof((_Sock)->un.sun_path) - 1); \
} while (0);
} while (0)
#endif