]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: virnetsockettest: Print the error if getifaddrs fails.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 1 Jan 2014 15:49:53 +0000 (15:49 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 1 Jan 2014 16:34:13 +0000 (16:34 +0000)
tests/virnetsockettest.c

index eda95bcc022e89dbc82997f633ea2d92d1607e17..82c202e1011bb8d0a14d8c5d4aa7888014df26a8 100644 (file)
@@ -60,8 +60,10 @@ checkProtocols(bool *hasIPv4, bool *hasIPv6,
     *hasIPv4 = *hasIPv6 = false;
     *freePort = 0;
 
-    if (getifaddrs(&ifaddr) < 0)
+    if (getifaddrs(&ifaddr) < 0) {
+        perror ("getifaddrs");
         goto cleanup;
+    }
 
     for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
         if (!ifa->ifa_addr)