From 00c6cccfa2b5444c6d0fb7aaa3071dbaf03884e3 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Thu, 10 Mar 2011 16:12:53 +0100 Subject: [PATCH] [Listener] Use memset() instead of bzero() --- infrastructure-centred/owlps-listener/owlps-listenerd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infrastructure-centred/owlps-listener/owlps-listenerd.c b/infrastructure-centred/owlps-listener/owlps-listenerd.c index 1f026f0..5be1209 100644 --- a/infrastructure-centred/owlps-listener/owlps-listenerd.c +++ b/infrastructure-centred/owlps-listener/owlps-listenerd.c @@ -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)