[Listener] Use memset() instead of bzero()

This commit is contained in:
Matteo Cypriani 2011-03-10 16:12:53 +01:00
parent abb1d170cf
commit 00c6cccfa2
1 changed files with 3 additions and 3 deletions

View File

@ -540,7 +540,7 @@ void read_packet(u_char *args, const struct pcap_pkthdr *header,
BOOL uses_autocalibration_request_port = FALSE ;
int i ; // Iterator
bzero(couple.mobile_ip_addr_bytes, 4) ; // Blank the IP
memset(couple.mobile_ip_addr_bytes, 0, 4) ; // Blank the IP
/* Common treatements */
@ -633,7 +633,7 @@ void read_packet(u_char *args, const struct pcap_pkthdr *header,
couple.start_time = timeval_to_timestamp(header->ts) ;
// Transmission time on the mobile is unknown (unless the packet is
// an explicit request):
bzero(&couple.request_time, sizeof(TIMESTAMP)) ;
memset(&couple.request_time, 0, sizeof(TIMESTAMP)) ;
// Blank position data:
couple.direction = 0 ;
couple.x_position = 0 ;
@ -863,7 +863,7 @@ void get_mac_addr(char *eth, unsigned char mac_bytes[6])
struct ifreq ifr;
int sockfd ;
bzero(mac_bytes, sizeof(unsigned char) * 6) ; // Empty mac_bytes
memset(mac_bytes, 0, sizeof(unsigned char) * 6) ; // Empty mac_bytes
sockfd = socket(AF_INET, SOCK_DGRAM, 0) ;
if(sockfd < 0)