]> mj.ucw.cz Git - nwho.git/commitdiff
nwhod: Fixed an initialization bug in make_pkt()
authorMartin Mares <mj@ucw.cz>
Fri, 9 Oct 2015 12:37:55 +0000 (14:37 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 9 Oct 2015 12:37:55 +0000 (14:37 +0200)
Thanks to GCC warnings :)

nwhod.c

diff --git a/nwhod.c b/nwhod.c
index 878db6b3844247f7a0b24b8f9e2a64b5fe7ee8a5..4e32ea67ee12adb4384e30b5732852974bc83775 100644 (file)
--- a/nwhod.c
+++ b/nwhod.c
@@ -136,7 +136,7 @@ scan_load(struct nwho_pkt *p)
 static void
 make_pkt(struct nwho_pkt *pkt)
 {
-  bzero(pkt, sizeof(pkt));
+  bzero(pkt, sizeof(*pkt));
   pkt->magic = htonl(NWHO_MAGIC);
   pkt->local_time = htonl(now);
   scan_utmp(pkt, now);