public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6359] libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes [PR108944]
@ 2023-02-27 16:30 Gaius Mulley
  0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2023-02-27 16:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e5fcf084e381aefe170dcd418dc97e469dacfa91

commit r13-6359-ge5fcf084e381aefe170dcd418dc97e469dacfa91
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Mon Feb 27 16:29:18 2023 +0000

    libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes [PR108944]
    
    The pattern parameter to memset is second.  Correct an obvious mistake
    in libm2pim/sckt.cc.
    
    libgm2/ChangeLog:
    
            PR modula2/108944
            * libm2pim/sckt.cc (getLocalIP): Correct parameter order.
    
    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

Diff:
---
 libgm2/libm2pim/sckt.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgm2/libm2pim/sckt.cc b/libgm2/libm2pim/sckt.cc
index ee579c2cc69..cd9d9c558b2 100644
--- a/libgm2/libm2pim/sckt.cc
+++ b/libgm2/libm2pim/sckt.cc
@@ -251,7 +251,7 @@ EXPORT(getLocalIP) (tcpServerState *s)
       return 0;
     }
 
-  memset (&sa, sizeof (struct sockaddr_in), 0);
+  memset (&sa, 0, sizeof (struct sockaddr_in));
   sa.sin_family = AF_INET;
   sa.sin_port = htons (80);
   if (hp->h_length == sizeof (unsigned int))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-27 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 16:30 [gcc r13-6359] libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes [PR108944] Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).