From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkE7g-0002PS-11 for qemu-devel@nongnu.org; Fri, 22 Jul 2011 07:42:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkE7e-0002UY-RN for qemu-devel@nongnu.org; Fri, 22 Jul 2011 07:42:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkE7e-0002UP-Jp for qemu-devel@nongnu.org; Fri, 22 Jul 2011 07:42:26 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6MBgPBZ005687 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 22 Jul 2011 07:42:25 -0400 Received: from localhost.localdomain (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6MBgLs9007979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 22 Jul 2011 07:42:25 -0400 From: Christophe Fergeau Date: Fri, 22 Jul 2011 13:42:17 +0200 Message-Id: <1311334940-29362-2-git-send-email-cfergeau@redhat.com> In-Reply-To: <1311334940-29362-1-git-send-email-cfergeau@redhat.com> References: <1311334940-29362-1-git-send-email-cfergeau@redhat.com> Subject: [Qemu-devel] [PATCHv4 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 Reviewed-by: Alon Levy --- 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.6