From aa990a9f58b5f46da95eb360049577a8833d649e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 18 Aug 2008 14:13:29 -0700 Subject: Use XCALLOC Replace calls to XMALLOC followed by memset with XCALLOC. --- lib/sockunion.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/sockunion.c') 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. */ -- cgit v1.2.3