Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libutil check for getnameinfo error correctly; thanks to...



details:   https://anonhg.NetBSD.org/src/rev/37468a9ae6c7
branches:  trunk
changeset: 571365:37468a9ae6c7
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Nov 19 22:05:23 2004 +0000

description:
check for getnameinfo error correctly; thanks to Peter Postma.

diffstat:

 lib/libutil/sockaddr_snprintf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 53dfab7f442c -r 37468a9ae6c7 lib/libutil/sockaddr_snprintf.c
--- a/lib/libutil/sockaddr_snprintf.c   Fri Nov 19 21:48:30 2004 +0000
+++ b/lib/libutil/sockaddr_snprintf.c   Fri Nov 19 22:05:23 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sockaddr_snprintf.c,v 1.1 2004/11/19 21:37:19 christos Exp $   */
+/*     $NetBSD: sockaddr_snprintf.c,v 1.2 2004/11/19 22:05:23 christos Exp $   */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: sockaddr_snprintf.c,v 1.1 2004/11/19 21:37:19 christos Exp $");
+__RCSID("$NetBSD: sockaddr_snprintf.c,v 1.2 2004/11/19 22:05:23 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -112,7 +112,7 @@
        }
 
        if (a && getnameinfo(sa, sa->sa_len, addr = abuf, sizeof(abuf),
-           NULL, 0, NI_NUMERICHOST|NI_NUMERICSERV) == -1)
+           NULL, 0, NI_NUMERICHOST|NI_NUMERICSERV) != 0)
                return -1;
 
        for (ptr = fmt; *ptr; ptr++) {



Home | Main Index | Thread Index | Old Index