summaryrefslogtreecommitdiffstats
path: root/arp.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-28 15:32:04 +0000
committerRoy Marples <roy@marples.name>2008-01-28 15:32:04 +0000
commit7ab8b9f184628ec9bd7466df72e61d621185fa55 (patch)
treee10c07f2f31506f7082a158acf3db82a2170f5a0 /arp.c
parent36c01cf227ef87707950b60d6feccb5098a73b01 (diff)
downloaddhcpcd-7ab8b9f184628ec9bd7466df72e61d621185fa55.tar.xz
Introduce xzalloc, which zeros memory as well as allocates it. This makes us smaller.
Diffstat (limited to 'arp.c')
-rw-r--r--arp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arp.c b/arp.c
index e427fa99..01ce1e78 100644
--- a/arp.c
+++ b/arp.c
@@ -81,9 +81,7 @@ static int send_arp (const interface_t *iface, int op, struct in_addr sip,
caddr_t tha;
int retval;
- arp = xmalloc (arpsize);
- memset (arp, 0, arpsize);
-
+ arp = xzalloc (arpsize);
arp->ar_hrd = htons (iface->family);
arp->ar_pro = htons (ETHERTYPE_IP);
arp->ar_hln = iface->hwlen;