[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 18/23] libcacard/vcard_emul_nss: Drop a redundant c
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 18/23] libcacard/vcard_emul_nss: Drop a redundant conditional |
Date: |
Mon, 26 May 2014 11:20:06 +0400 |
From: Markus Armbruster <address@hidden>
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 <address@hidden>
Reviewed-by: Alon Levy <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
libcacard/vcard_emul_nss.c | 5 -----
1 file changed, 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);
--
1.7.10.4
- [Qemu-trivial] [PULL 14/23] libcacard: Plug memory leaks around vreader_get_reader_list(), (continued)
- [Qemu-trivial] [PULL 14/23] libcacard: Plug memory leaks around vreader_get_reader_list(), Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 09/23] arch_init: replace fprintf(stderr, ...) with error_report(), Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 15/23] libcacard/vreader: Drop broken recovery from failed assertion, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 16/23] libcacard/vreader: Tighten assertion to clarify intent, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 23/23] libcacard: remove useless initializers, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 12/23] vl: fix 'name' option to work with -readconfig, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 06/23] bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etc, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 17/23] libcacard: Convert two leftover realloc() to GLib, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 22/23] net: cadence_gem: Fix top comment, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 03/23] nbd: Close socket on negotiation failure., Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 18/23] libcacard/vcard_emul_nss: Drop a redundant conditional,
Michael Tokarev <=
- [Qemu-trivial] [PULL 11/23] configure: Put tempfiles in a subdir of the build directory, Michael Tokarev, 2014/05/26
- Re: [Qemu-trivial] [Qemu-devel] [PULL 00/23] Trivial patches for 2014-05-26, Peter Maydell, 2014/05/27