Skip to contentSkip to conversation

libcacard: fix opposite usage of isspace

PATCH Applied Alon Levy 3 participants 3 messages Apr 13, 2011 – Apr 18, 2011

lore
Share & tools
lore

Alon Levy

author
#0 lore raw

PATCH 1/1 libcacard: fix opposite usage of isspace

---
 libcacard/vcard_emul_nss.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
libcacard/vcard_emul_nss.c +2 -2
index 71f2ba3..baada52 100644
@@ -955,7 +955,7 @@ count_tokens(const char *str, char token, char token_end)
 static const char *
 strip(const char *str)
 {
-    for (; *str && !isspace(*str); str++) {
+    for (; *str && isspace(*str); str++) {
     }
     return str;
 }
@@ -963,7 +963,7 @@ strip(const char *str)
 static const char *
 find_blank(const char *str)
 {
-    for (; *str && isspace(*str); str++) {
+    for (; *str && !isspace(*str); str++) {
     }
     return str;
 }
Signature · 1 line
1.7.4.2
Tested-by on v1 1/1
#1 lore raw

This is the result of an of the list discussion with me, and I can confirm this fixes the issues I was seeing:

Quoted 27 lines · Alon Levy
---
  libcacard/vcard_emul_nss.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
libcacard/vcard_emul_nss.c +2 -2
index 71f2ba3..baada52 100644
@@ -955,7 +955,7 @@ count_tokens(const char *str, char token, char token_end)
  static const char *
  strip(const char *str)
  {
-    for (; *str&&  !isspace(*str); str++) {
+    for (; *str&&  isspace(*str); str++) {
      }
      return str;
  }
@@ -963,7 +963,7 @@ strip(const char *str)
  static const char *
  find_blank(const char *str)
  {
-    for (; *str&&  isspace(*str); str++) {
+    for (; *str&&  !isspace(*str); str++) {
      }
      return str;
  }
#2 lore raw
In reply to Alon Levy
Quoted 4 lines · Alon Levy
---
 libcacard/vcard_emul_nss.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Thanks, applied.

Quoted 27 lines
libcacard/vcard_emul_nss.c +2 -2
index 71f2ba3..baada52 100644
@@ -955,7 +955,7 @@ count_tokens(const char *str, char token, char token_end)
 static const char *
 strip(const char *str)
 {
-    for (; *str && !isspace(*str); str++) {
+    for (; *str && isspace(*str); str++) {
     }
     return str;
 }
@@ -963,7 +963,7 @@ strip(const char *str)
 static const char *
 find_blank(const char *str)
 {
-    for (; *str && isspace(*str); str++) {
+    for (; *str && !isspace(*str); str++) {
     }
     return str;
 }
Signature · 1 line
1.7.4.2
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net