From patchwork Mon Jun 27 15:27:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Fergeau X-Patchwork-Id: 102216 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2AC47B6F67 for ; Tue, 28 Jun 2011 02:20:56 +1000 (EST) Received: from localhost ([::1]:58466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbEYO-0002oR-Hv for incoming@patchwork.ozlabs.org; Mon, 27 Jun 2011 12:20:52 -0400 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 To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCHv2 1/4] libcacard: s/strip(args++)/strip(args+1) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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; }