diff options
Diffstat (limited to 'sysdeps/linux/glibtop_server.h')
-rw-r--r-- | sysdeps/linux/glibtop_server.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h index 69143fe4..80796c20 100644 --- a/sysdeps/linux/glibtop_server.h +++ b/sysdeps/linux/glibtop_server.h @@ -41,12 +41,19 @@ G_BEGIN_DECLS unsigned get_pageshift(); +static inline char* +next_token(const char *p) +{ + while (isspace(*p)) p++; + return (char*) p; +} static inline char * skip_token (const char *p) { - while (isspace(*p)) p++; + p = next_token(p); while (*p && !isspace(*p)) p++; + p = next_token(p); return (char *)p; } |