From: Christophe Fergeau <cfergeau@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCHv2 1/4] libcacard: s/strip(args++)/strip(args+1)
Date: Mon, 27 Jun 2011 17:27:36 +0200 [thread overview]
Message-ID: <1309188459-806-2-git-send-email-cfergeau@redhat.com> (raw)
In-Reply-To: <1309188459-806-1-git-send-email-cfergeau@redhat.com>
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 <cfergeau@redhat.com>
---
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
next prev parent reply other threads:[~2011-06-27 15:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 14:37 [Qemu-devel] [PATCH 1/2] libcacard: fix soft=... parsing in vcard_emul_options Christophe Fergeau
2011-06-24 14:37 ` [Qemu-devel] [PATCH 2/2] libcacard: replace copy_string with strndup Christophe Fergeau
2011-06-24 14:52 ` Alon Levy
2011-06-24 16:51 ` [Qemu-devel] [PATCH 1/2] libcacard: fix soft=... parsing in vcard_emul_options Alon Levy
2011-06-27 12:13 ` Christophe Fergeau
2011-06-27 15:27 ` [Qemu-devel] [PATCHv2 0/4] libcacard fixes Christophe Fergeau
2011-06-27 15:27 ` Christophe Fergeau [this message]
2011-06-27 15:27 ` [Qemu-devel] [PATCHv2 2/4] libcacard: fix soft=... parsing in vcard_emul_options Christophe Fergeau
2011-06-27 15:27 ` [Qemu-devel] [PATCHv2 3/4] libcacard: introduce NEXT_TOKEN macro Christophe Fergeau
2011-06-27 15:27 ` [Qemu-devel] [PATCHv2 4/4] libcacard: replace copy_string with strndup Christophe Fergeau
2011-06-27 19:57 ` [Qemu-devel] [PATCHv2 0/4] libcacard fixes Alon Levy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1309188459-806-2-git-send-email-cfergeau@redhat.com \
--to=cfergeau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).