diff --git a/src/Conn.cc b/src/Conn.cc index 8b017b5686..5796ad898c 100644 --- a/src/Conn.cc +++ b/src/Conn.cc @@ -80,12 +80,12 @@ Connection::Connection(NetSessions* s, const ConnIDKey& k, double t, const ConnI if ( pkt->l2_src ) memcpy(orig_l2_addr, pkt->l2_src, sizeof(orig_l2_addr)); else - bzero(orig_l2_addr, sizeof(orig_l2_addr)); + memset(orig_l2_addr, 0, sizeof(orig_l2_addr)); if ( pkt->l2_dst ) memcpy(resp_l2_addr, pkt->l2_dst, sizeof(resp_l2_addr)); else - bzero(resp_l2_addr, sizeof(resp_l2_addr)); + memset(resp_l2_addr, 0, sizeof(resp_l2_addr)); vlan = pkt->vlan; inner_vlan = pkt->inner_vlan; diff --git a/src/IntSet.h b/src/IntSet.h index 75bd977bf7..20b1d257d0 100644 --- a/src/IntSet.h +++ b/src/IntSet.h @@ -27,14 +27,11 @@ private: unsigned char* set; }; - -#define bzero(p, size) memset(p, 0, size) - inline IntSet::IntSet(unsigned int n) { size = n / 8 + 1; set = new unsigned char[size]; - bzero(set, size); + memset(set, 0, size); } inline IntSet::~IntSet() @@ -65,5 +62,5 @@ inline bool IntSet::Contains(unsigned int i) const inline void IntSet::Clear() { - bzero(set, size); + memset(set, 0, size); }