test-getaddrinfo: report error information
authorEric Blake <eblake@redhat.com>
Tue, 3 May 2011 21:27:11 +0000 (15:27 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 3 May 2011 21:27:11 +0000 (15:27 -0600)
Clang deduced that if ENABLE_DEBUGGING is undefined, then err
was a dead assignment.  But in the EAI_SYSTEM case, we fail
the test, so the output should be unconditional.

* tests/test-getaddrinfo.c (simple): Use err outside of dbprintf.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
tests/test-getaddrinfo.c

index 8f96680..5df0852 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-03  Eric Blake  <eblake@redhat.com>
+
+       test-getaddrinfo: report error information
+       * tests/test-getaddrinfo.c (simple): Use err outside of dbprintf.
+
 2011-05-03  Jim Meyering  <meyering@redhat.com>
 
        bootstrap: avoid build failure when $GZIP is set
index 4826989..d2984e2 100644 (file)
@@ -107,7 +107,7 @@ simple (char const *host, char const *service)
 #endif
       /* Provide details if errno was set.  */
       if (res == EAI_SYSTEM)
-        dbgprintf ("system error: %s\n", strerror (err));
+        fprintf (stderr, "system error: %s\n", strerror (err));
 
       return 1;
     }