diff options
author | Benoît Dejean <bdejean@gmail.com> | 2016-10-13 19:33:19 +0200 |
---|---|---|
committer | Benoît Dejean <bdejean@gmail.com> | 2017-01-22 10:45:26 +0100 |
commit | 01a56e2e30877e21d1258d2606111166dd6883eb (patch) | |
tree | cb356e18c7f39bfac84ee7e11f42df3f306b2f46 | |
parent | 7afc81f99dbd3ff1439fa05169f24dd471cdc519 (diff) | |
download | libgtop-01a56e2e30877e21d1258d2606111166dd6883eb.tar.gz |
Use g_ascii_isspace instead of isspace because the later is slower and we
only need to deal with ascii.
-rw-r--r-- | sysdeps/linux/glibtop_private.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/glibtop_private.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/linux/glibtop_private.c b/sysdeps/linux/glibtop_private.c index 5fff7359..d3a49aa6 100644 --- a/sysdeps/linux/glibtop_private.c +++ b/sysdeps/linux/glibtop_private.c @@ -51,7 +51,7 @@ char * skip_token (const char *p) { p = next_token(p); - while (*p && !isspace(*p)) p++; + while (*p && !g_ascii_isspace(*p)) p++; p = next_token(p); return (char *)p; } diff --git a/sysdeps/linux/glibtop_private.h b/sysdeps/linux/glibtop_private.h index d00a1525..03761f4f 100644 --- a/sysdeps/linux/glibtop_private.h +++ b/sysdeps/linux/glibtop_private.h @@ -37,7 +37,7 @@ G_BEGIN_DECLS static inline char* next_token(const char *p) { - while (isspace(*p)) p++; + while (g_ascii_isspace(*p)) p++; return (char*) p; } |