summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-04-09 14:08:30 +0000
committerJim Meyering <jim@meyering.net>2005-04-09 14:08:30 +0000
commit22210b83b46d5c0656f722e92661145c100b0c3a (patch)
tree3d1ca1366216fd1f28197c2ac8e10fff20720c64 /lib
parent32e72c50cc6df29eb85906ee7c72761298eb4bf4 (diff)
downloadcoreutils-22210b83b46d5c0656f722e92661145c100b0c3a.tar.xz
(canon_host) [HAVE_GETADDRINFO]: Use memset
rather than `= { 0 };' to initialize local `hint'.
Diffstat (limited to 'lib')
-rw-r--r--lib/canon-host.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/canon-host.c b/lib/canon-host.c
index fb6621cb5..db1dd0f42 100644
--- a/lib/canon-host.c
+++ b/lib/canon-host.c
@@ -1,6 +1,6 @@
/* Host name canonicalization
- Copyright (C) 1995, 1999, 2000, 2002, 2003, 2004 Free Software
+ Copyright (C) 1995, 1999, 2000, 2002, 2003, 2004, 2005 Free Software
Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -54,8 +54,9 @@ canon_host (char const *host)
#if HAVE_GETADDRINFO
{
- struct addrinfo hint = { 0 };
+ struct addrinfo hint;
struct addrinfo *res = NULL;
+ memset (&hint, 0, sizeof hint);
hint.ai_flags = AI_CANONNAME;
if (getaddrinfo (host, NULL, &hint, &res) == 0)
{