From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGetL-0007Oc-3k for qemu-devel@nongnu.org; Wed, 19 Oct 2011 18:45:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGetJ-0004Al-An for qemu-devel@nongnu.org; Wed, 19 Oct 2011 18:45:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGetI-0004AC-TR for qemu-devel@nongnu.org; Wed, 19 Oct 2011 18:45:41 -0400 Date: Thu, 20 Oct 2011 00:42:55 +0200 From: Alon Levy Message-ID: <20111019224255.GI2440@bow.tlv.redhat.com> References: <1319051002-27003-1-git-send-email-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1319051002-27003-1-git-send-email-sw@weilnetz.de> Subject: Re: [Qemu-devel] [PATCH] libcacard: Fix wrong assertion (reported by cppcheck) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org On Wed, Oct 19, 2011 at 09:03:22PM +0200, Stefan Weil wrote: > assert("...") will never do anything. This assertion handles a case > which should never occur, so it must be assert(!"..."). > Thanks, I'll pick it up for a pull request. > Cc: Alon Levy > Signed-off-by: Stefan Weil > --- > libcacard/card_7816.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/libcacard/card_7816.c b/libcacard/card_7816.c > index 9fd59d4..6fe27d5 100644 > --- a/libcacard/card_7816.c > +++ b/libcacard/card_7816.c > @@ -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 = > -- > 1.7.2.5 >