summaryrefslogtreecommitdiffstats
path: root/lib/sockunion.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 14:13:29 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 14:13:29 -0700
commitaa990a9f58b5f46da95eb360049577a8833d649e (patch)
treefaeff19a39b9c1df101fe381920e52178011e99a /lib/sockunion.c
parente5d63369e1f3fdc1c22ae15fe477de1f97022703 (diff)
downloadquagga-aa990a9f58b5f46da95eb360049577a8833d649e.tar.bz2
quagga-aa990a9f58b5f46da95eb360049577a8833d649e.tar.xz
Use XCALLOC
Replace calls to XMALLOC followed by memset with XCALLOC.
Diffstat (limited to 'lib/sockunion.c')
-rw-r--r--lib/sockunion.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sockunion.c b/lib/sockunion.c
index cfd3bf9a..1ae092bd 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -180,8 +180,7 @@ sockunion_str2su (const char *str)
int ret;
union sockunion *su;
- su = XMALLOC (MTYPE_SOCKUNION, sizeof (union sockunion));
- memset (su, 0, sizeof (union sockunion));
+ su = XCALLOC (MTYPE_SOCKUNION, sizeof (union sockunion));
ret = inet_pton (AF_INET, str, &su->sin.sin_addr);
if (ret > 0) /* Valid IPv4 address format. */