[libvirt] [PATCH 1/2] nsstest: Drop useless @data check

Michal Privoznik mprivozn at redhat.com
Thu Mar 24 14:18:50 UTC 2016


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 at redhat.com>
---
 tests/nsstest.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tests/nsstest.c b/tests/nsstest.c
index 9d7bc40..7399d9a 100644
--- a/tests/nsstest.c
+++ b/tests/nsstest.c
@@ -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,
-- 
2.7.3




More information about the libvir-list mailing list