diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-05-14 18:06:22 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-05-14 18:06:22 +0000 |
commit | 44dfbe46d4c61735e483124d93292456fdcff79e (patch) | |
tree | cdcb6e90baf56d0bec3b1560fcb233c7d8560ec1 /usr.sbin | |
parent | 10540a60030049267dfec8e2294d42b34a46131d (diff) |
"error" was typed double, which is not suitable for getaddrinfo(3).
from tobias
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rdate/ntp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/rdate/ntp.c b/usr.sbin/rdate/ntp.c index 65a9847e250..31aae2061b9 100644 --- a/usr.sbin/rdate/ntp.c +++ b/usr.sbin/rdate/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.13 2002/09/08 12:33:42 jakob Exp $ */ +/* $OpenBSD: ntp.c,v 1.14 2003/05/14 18:06:21 itojun Exp $ */ /* * Copyright (c) 1996, 1997 by N.M. Maclaren. All rights reserved. @@ -119,14 +119,14 @@ ntp_client(const char *hostname, struct timeval *new, { struct addrinfo hints, *res0, *res; double offset, error; - int packets = 0, s; + int packets = 0, s, ierror; memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; - error = getaddrinfo(hostname, "ntp", &hints, &res0); - if (error) { - errx(1, "%s: %s", hostname, gai_strerror(error)); + ierror = getaddrinfo(hostname, "ntp", &hints, &res0); + if (ierror) { + errx(1, "%s: %s", hostname, gai_strerror(ierror)); /*NOTREACHED*/ } |