summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoît Dejean <bdejean@gmail.com>2016-10-13 19:33:19 +0200
committerBenoît Dejean <bdejean@gmail.com>2017-01-22 10:45:26 +0100
commit01a56e2e30877e21d1258d2606111166dd6883eb (patch)
treecb356e18c7f39bfac84ee7e11f42df3f306b2f46
parent7afc81f99dbd3ff1439fa05169f24dd471cdc519 (diff)
downloadlibgtop-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.c2
-rw-r--r--sysdeps/linux/glibtop_private.h2
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;
}