[Bro-Dev] [JIRA] (BIT-1420) Replace bzero() with memset() in broccoli/test/broping.c

Bill Parker (JIRA) jira at bro-tracker.atlassian.net
Sat Jun 6 13:53:00 PDT 2015

Bill Parker created BIT-1420:

             Summary: Replace bzero() with memset() in broccoli/test/broping.c
                 Key: BIT-1420
                 URL: https://bro-tracker.atlassian.net/browse/BIT-1420
             Project: Bro Issue Tracker
          Issue Type: Patch
          Components: Broccoli
    Affects Versions: 2.3
         Environment: Operating System (Linux/Unix/Windows/All)
            Reporter: Bill Parker
         Attachments: broping.c.patch


  In reviewing code for file 'broping.c' in directory 'broccoli/test', I found an instance of
a call to bzero() which is deprecated per POSIX/C99 standards, which should be replaced
with memset().  The patch file which changes this is below:

--- broping.c.orig      2015-06-06 09:43:16.694378874 -0700
+++ broping.c   2015-06-06 09:44:06.625724891 -0700
@@ -224,7 +224,7 @@
-  bzero(&server, sizeof(server));
+  memset(&server, 0, sizeof(server));
   server.sin_family = AF_INET;
   server.sin_port = htons(port);
   server.sin_addr.s_addr = 0;

I am attaching the patch file to this bug report.

Bill Parker (wp02855 at gmail dot com)

This message was sent by Atlassian JIRA

More information about the bro-dev mailing list