mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-04 23:43:45 +08:00
(canon_host) [HAVE_GETADDRINFO]: Use memset
rather than `= { 0 };' to initialize local `hint'.
This commit is contained in:
parent
32e72c50cc
commit
22210b83b4
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user