]> xenbits.xensource.com Git - libvirt.git/commitdiff
nsstest: Drop useless @data check
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Mar 2016 13:54:58 +0000 (14:54 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Mar 2016 16:35:14 +0000 (17:35 +0100)
The variable is dereferenced prior its check for NULL. The check
itself does not make much sense anyway - it's our test, we know
we are not passing NULL.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tests/nsstest.c

index 9d7bc409c2a0c0106b8274ddd1a9d0da15455819..7399d9a4b469ac56b567e9b0b59607fe59104049 100644 (file)
@@ -51,9 +51,6 @@ testGetHostByName(const void *opaque)
     int rv, tmp_errno = 0, tmp_herrno = 0;
     size_t i = 0, j = 0;
 
-    if (!data)
-        goto cleanup;
-
     memset(&resolved, 0, sizeof(resolved));
 
     rv = _nss_libvirt_gethostbyname2_r(data->hostname,