summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-06-24 17:33:58 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-06-24 17:33:58 +0000
commit406929bb9ddcda72ed3bded33af574f9e5812302 (patch)
tree784184ecceebae1e97c5a2aa0fdc780139d3cfa6 /lib
parent534ccf18c2c0365d324cb52b30c1bb3907aec607 (diff)
downloadcoreutils-406929bb9ddcda72ed3bded33af574f9e5812302.tar.xz
(canon_host) [HAVE_GETADDRINFO]: Use `= { 0, };' to initialize local `hint'.
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog6
-rw-r--r--lib/canon-host.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index f71d0fcf0..eb9418bc1 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * canon-host.c (canon_host) [HAVE_GETADDRINFO]: Use `= { 0, };' to
+ initialize local `hint'. This undoes the previous change, and
+ syncs with gnulib.
+
2005-06-23 Jim Meyering <jim@meyering.net>
* Makefile.am (libcoreutils_a_SOURCES): Remove xreadlink.c
diff --git a/lib/canon-host.c b/lib/canon-host.c
index a36428db6..0d469ba1a 100644
--- a/lib/canon-host.c
+++ b/lib/canon-host.c
@@ -54,9 +54,8 @@ canon_host (char const *host)
#if HAVE_GETADDRINFO
{
- struct addrinfo hint;
+ struct addrinfo hint = { 0, };
struct addrinfo *res = NULL;
- memset (&hint, 0, sizeof hint);
hint.ai_flags = AI_CANONNAME;
if (getaddrinfo (host, NULL, &hint, &res) == 0)
{