On Tue, Dec 10, 2024 at 02:18:33PM +0000, Bertrand Drouvot wrote:
> While searching for memcmp() calls in "*stat*.c" files (due to [1]), it 
> appeared
> that we could $SUBJECT. Please find attached a patch doing so.

-            SockAddr    zero_clientaddr;
-            memset(&zero_clientaddr, 0, sizeof(zero_clientaddr));
-            if (memcmp(&(beentry->st_clientaddr), &zero_clientaddr,
-                       sizeof(zero_clientaddr)) == 0)
+            if (pg_memory_is_all_zeros(&(beentry->st_clientaddr),
+                                       sizeof(beentry->st_clientaddr)))

It also means that you're removing these variables used only for the
all-zero comparisons.  Makes sense to me.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to