Browse Source

[cleanup] convert bzero() deprecated by POSIX to memset()

autoscan 2.62 complains about bzero(), so a good fix
nowadays is to just replace it.
Jeremy Jackson 11 years ago
parent
commit
ec5e42b3c5
3 changed files with 3 additions and 3 deletions
  1. 1 1
      isisd/isis_lsp.c
  2. 1 1
      zebra/irdp_interface.c
  3. 1 1
      zebra/irdp_packet.c

+ 1 - 1
isisd/isis_lsp.c

@@ -769,7 +769,7 @@ lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost)
   /* for the hostname tlv */
   if (lsp->tlv_data.hostname)
     {
-      bzero (hostname, sizeof (hostname));
+      memset (hostname, 0, sizeof (hostname));
       memcpy (hostname, lsp->tlv_data.hostname->name,
 	      lsp->tlv_data.hostname->namelen);
       vty_out (vty, "  Hostname: %s%s", hostname, VTY_NEWLINE);

+ 1 - 1
zebra/irdp_interface.c

@@ -101,7 +101,7 @@ if_group (struct interface *ifp,
 
   zi = ifp->info;
 
-  bzero (&m, sizeof (m));
+  memset (&m, 0, sizeof (m));
   m.imr_multiaddr.s_addr = htonl (group);
   p = irdp_get_prefix(ifp);
 

+ 1 - 1
zebra/irdp_packet.c

@@ -332,7 +332,7 @@ send_packet(struct interface *ifp,
 	zlog_warn("sendto %s", safe_strerror (errno));
   }
 
-  bzero(&sockdst,sizeof(sockdst));
+  memset(&sockdst,0,sizeof(sockdst));
   sockdst.sin_family=AF_INET;
   sockdst.sin_addr.s_addr = dst;