diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-05-23 13:24:39 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-05-24 00:46:37 +0400 |
commit | 42119fa3568dc7e8c82447c861678a5987d06d91 (patch) | |
tree | 168f2390c0676429fb0e499f43f204838aa877b7 /libcacard | |
parent | 26b78f4d3c3f45f84067440e56c3ebf2d25a9574 (diff) | |
download | qemu-42119fa3568dc7e8c82447c861678a5987d06d91.zip qemu-42119fa3568dc7e8c82447c861678a5987d06d91.tar.gz qemu-42119fa3568dc7e8c82447c861678a5987d06d91.tar.bz2 |
libcacard/vcard_emul_nss: Drop a redundant conditional
Bailing out when PK11_FindGenericObjects() returns null ensures the
loop that follows it executes at least once. The "loop did not
execute" test right after it is useless. Drop it.
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'libcacard')
-rw-r--r-- | libcacard/vcard_emul_nss.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 8e05551..b7db51d 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -618,11 +618,6 @@ vcard_emul_mirror_card(VReader *vreader) cert_count++; } - if (cert_count == 0) { - PK11_DestroyGenericObjects(firstObj); - return NULL; - } - /* allocate the arrays */ vcard_emul_alloc_arrays(&certs, &cert_len, &keys, cert_count); |