From 01a56e2e30877e21d1258d2606111166dd6883eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Thu, 13 Oct 2016 19:33:19 +0200 Subject: [PATCH] Use g_ascii_isspace instead of isspace because the later is slower and we only need to deal with ascii. --- sysdeps/linux/glibtop_private.c | 2 +- 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; }