Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions inc/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ typedef unsigned char u_char;
typedef unsigned long u_int;
typedef signed char s_char;
typedef unsigned short u_short;
/* DOS doesn't have the BSD bzero &c functions */
#define bzero(place,len) memset(place, 0, len)
#undef UNALIGNED_FETCH_OK
#undef HAS_GETHOSTID
#undef REGISTER
Expand Down
3 changes: 2 additions & 1 deletion src/Cldeetr.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "version.h"

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/time.h>
Expand Down Expand Up @@ -99,7 +100,7 @@ int main(int argc, char *argv[])
perror("Couldn't GIFCONF socket; Net is off");
#else /* OS4 */

bzero(ifbuf, sizeof(ifbuf));
memset(ifbuf, 0, sizeof(ifbuf));
{
/* we have to get the interface name from another socket, since
/dev/nit doesn't know anything until it gets bound, and we
Expand Down
7 changes: 4 additions & 3 deletions src/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#endif

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#ifndef DOS
Expand Down Expand Up @@ -850,7 +851,7 @@ void init_ether() {
if_data.ifc_len = sizeof(ifbuf);
if_data.ifc_req = ifbuf;
/* 4.0 - before the SIOCGIFCONF, do:
bzero(ifbuf, sizeof(ifbuf))
memset(ifbuf, 0, sizeof(ifbuf))
*/
if (ioctl(ether_fd, SIOCGIFCONF, &if_data) < 0) {
perror("Couldn't GIFCONF socket; Net is off");
Expand All @@ -877,7 +878,7 @@ void init_ether() {
}
if_data.ifc_len = sizeof(ifbuf);
if_data.ifc_req = ifbuf;
bzero(ifbuf, sizeof(ifbuf));
memset(ifbuf, 0, sizeof(ifbuf));
{
/* we have to get the interface name from another socket, since
/dev/nit doesn't know anything until it gets bound, and we
Expand Down Expand Up @@ -978,7 +979,7 @@ void init_ether() {

#ifndef PKTFILTER
/* establish the operating modes */
bzero(&nioc, sizeof(nioc));
memset(&nioc, 0, sizeof(nioc));
nioc.nioc_bufspace = 20000;
nioc.nioc_chunksize = 50; /* small chunks so each packet read */
nioc.nioc_typetomatch = NT_ALLTYPES;
Expand Down
3 changes: 2 additions & 1 deletion src/ldeether.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ int main(int argc, char *argv[]) { return (0); }
/* THERE -IS- AN ETHERNET */

#include <stdio.h>
#include <string.h>

#ifdef USE_DLPI
#include <sys/stream.h>
Expand Down Expand Up @@ -168,7 +169,7 @@ int main(int argc, char *argv[]) {
perror("Couldn't GIFCONF socket; Net is off");
#else /* OS4 */

bzero(ifbuf, sizeof(ifbuf));
memset(ifbuf, 0, sizeof(ifbuf));
{
/* we have to get the interface name from another socket, since
/dev/nit doesn't know anything until it gets bound, and we
Expand Down
7 changes: 4 additions & 3 deletions src/oether.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "version.h"

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#ifndef DOS
#include <sys/file.h>
Expand Down Expand Up @@ -659,7 +660,7 @@ void init_ether() {
if_data.ifc_len = sizeof(ifbuf);
if_data.ifc_req = ifbuf;
/* 4.0 - before the SIOCGIFCONF, do:
bzero(ifbuf, sizeof(ifbuf))
memset(ifbuf, 0, sizeof(ifbuf))
*/
if (ioctl(ether_fd, SIOCGIFCONF, &if_data) < 0) {
perror("Couldn't GIFCONF socket; Net is off");
Expand All @@ -686,7 +687,7 @@ void init_ether() {
}
if_data.ifc_len = sizeof(ifbuf);
if_data.ifc_req = ifbuf;
bzero(ifbuf, sizeof(ifbuf));
memset(ifbuf, 0, sizeof(ifbuf));
{
/* we have to get the interface name from another socket, since
/dev/nit doesn't know anything until it gets bound, and we
Expand Down Expand Up @@ -783,7 +784,7 @@ if (ether_fd >= 0) {

#ifndef OS4
/* establish the operating modes */
bzero(&nioc, sizeof(nioc));
memset(&nioc, 0, sizeof(nioc));
nioc.nioc_bufspace = 20000;
nioc.nioc_chunksize = 50; /* small chunks so each packet read */
nioc.nioc_typetomatch = NT_ALLTYPES;
Expand Down
3 changes: 2 additions & 1 deletion src/oldeether.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ int main(int argc, char *argv[])
#else

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/time.h>
Expand Down Expand Up @@ -97,7 +98,7 @@ int main(int argc, char *argv[])
perror("Couldn't GIFCONF socket; Net is off");
#else /* OS4 */

bzero(ifbuf, sizeof(ifbuf));
memset(ifbuf, 0, sizeof(ifbuf));
{
/* we have to get the interface name from another socket, since
/dev/nit doesn't know anything until it gets bound, and we
Expand Down