libcacard: Fix wrong assertion (reported by cppcheck)
authorStefan Weil <sw@weilnetz.de>
Wed, 19 Oct 2011 19:03:22 +0000 (21:03 +0200)
committerAlon Levy <alevy@redhat.com>
Tue, 25 Oct 2011 13:44:03 +0000 (15:44 +0200)
assert("...") will never do anything. This assertion handles a case
which should never occur, so it must be assert(!"...").

Cc: Alon Levy <alevy@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
libcacard/card_7816.c

index 9fd59d4..6fe27d5 100644 (file)
@@ -754,7 +754,7 @@ vcard_process_apdu(VCard *card, VCardAPDU *apdu, VCardResponse **response)
         return vcard7816_vm_process_apdu(card, apdu, response);
     case VCARD_DIRECT:
         /* if we are type direct, then the applet should handle everything */
-        assert("VCARD_DIRECT: applet failure");
+        assert(!"VCARD_DIRECT: applet failure");
         break;
     }
     *response =