]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nss-resolve: simplify error handling
authorMartin Pitt <martin.pitt@ubuntu.com>
Fri, 16 Sep 2016 08:57:06 +0000 (10:57 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sat, 1 Oct 2016 14:43:29 +0000 (16:43 +0200)
Handle general errors from the resolved call in _nss_resolve_gethostbyaddr2_r()
the same say as in the other variants: Just "goto fail" as that does exactly
the same.

src/nss-resolve/nss-resolve.c

index 5ce10f1cbd9788edd76061b20799fb573b854dba..5db83e5d0e366f25e5149dc65224655680536220 100644 (file)
@@ -558,9 +558,7 @@ enum nss_status _nss_resolve_gethostbyaddr2_r(
                         goto fallback;
 
 
-                *errnop = -r;
-                *h_errnop = NO_RECOVERY;
-                return NSS_STATUS_UNAVAIL;
+                goto fail;
         }
 
         r = sd_bus_message_enter_container(reply, 'a', "(is)");