qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCHv4 1/4] libcacard: s/strip(args++)/strip(args+1)


From: Christophe Fergeau
Subject: [Qemu-devel] [PATCHv4 1/4] libcacard: s/strip(args++)/strip(args+1)
Date: Fri, 22 Jul 2011 13:42:17 +0200

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 <address@hidden>
Reviewed-by: Alon Levy <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]