diff mbox

libcacard: fix opposite usage of isspace

Message ID 1302694920-8111-1-git-send-email-alevy@redhat.com
State New
Headers show

Commit Message

Alon Levy April 13, 2011, 11:42 a.m. UTC
Signed-off-by: Alon Levy <alevy@redhat.com>
---
 libcacard/vcard_emul_nss.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Hans de Goede April 13, 2011, 12:53 p.m. UTC | #1
This is the result of an of the list discussion with
me, and I can confirm this fixes the issues I was seeing:

Tested-by: Hans de Goede <hdegoede@redhat.com>

On 04/13/2011 01:42 PM, Alon Levy wrote:
> Signed-off-by: Alon Levy<alevy@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 71f2ba3..baada52 100644
> --- a/libcacard/vcard_emul_nss.c
> +++ b/libcacard/vcard_emul_nss.c
> @@ -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;
>   }
Aurelien Jarno April 18, 2011, 7:18 p.m. UTC | #2
On Wed, Apr 13, 2011 at 02:42:00PM +0300, Alon Levy wrote:
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
>  libcacard/vcard_emul_nss.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Thanks, applied.

> diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c
> index 71f2ba3..baada52 100644
> --- a/libcacard/vcard_emul_nss.c
> +++ b/libcacard/vcard_emul_nss.c
> @@ -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;
>  }
> -- 
> 1.7.4.2
> 
> 
>
diff mbox

Patch

diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c
index 71f2ba3..baada52 100644
--- a/libcacard/vcard_emul_nss.c
+++ b/libcacard/vcard_emul_nss.c
@@ -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;
 }