From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbDj1-0005xD-3x for qemu-devel@nongnu.org; Mon, 27 Jun 2011 11:27:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbDix-0006DC-NJ for qemu-devel@nongnu.org; Mon, 27 Jun 2011 11:27:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbDix-0006Cu-3j for qemu-devel@nongnu.org; Mon, 27 Jun 2011 11:27:43 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5RFRgBI006136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 27 Jun 2011 11:27:42 -0400 Received: from localhost.localdomain (teriyaki.cdg.redhat.com [10.32.192.15]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5RFRd6Z012361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 27 Jun 2011 11:27:41 -0400 From: Christophe Fergeau Date: Mon, 27 Jun 2011 17:27:36 +0200 Message-Id: <1309188459-806-2-git-send-email-cfergeau@redhat.com> In-Reply-To: <1309188459-806-1-git-send-email-cfergeau@redhat.com> References: <1308926260-11995-1-git-send-email-cfergeau@redhat.com> <1309188459-806-1-git-send-email-cfergeau@redhat.com> Subject: [Qemu-devel] [PATCHv2 1/4] libcacard: s/strip(args++)/strip(args+1) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org vcard_emul_options used args = strip(args++) a few times, which was not returning the expected result since the rest of the code expected args to be increased by at least 1, which is not the case if *args is not a blank space when this function is called. Replace these calls by "strip(args+1)" which will do what we expect. Signed-off-by: Christophe Fergeau --- libcacard/vcard_emul_nss.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index f3db657..184252f 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -1041,7 +1041,7 @@ vcard_emul_options(const char *args) args++; continue; } - args = strip(args++); + args = strip(args+1); type_params = args; args = strpbrk(args + 1, ",)"); if (*args == 0) { @@ -1052,7 +1052,7 @@ vcard_emul_options(const char *args) continue; } type_params_length = args - name; - args = strip(args++); + args = strip(args+1); if (*args == 0) { break; } -- 1.7.5.4