Avoid isspace('\0').

This commit is contained in:
Martin Baulig
1999-03-18 09:25:58 +00:00
parent c3ea69f26a
commit fe98fde338

View File

@@ -64,11 +64,13 @@ init_sysinfo (glibtop *server)
p = strchr (buffer, ':');
if (!p) continue;
/* Remove leading spaces from `p'. */
*p = '\0'; start = p; p++;
while (isspace (*p)) p++;
while ((start > buffer) && isspace (*start))
/* Remove trailing spaces from `buffer'. */
while ((start > buffer) && (*start) && isspace (*start))
*start-- = '\0';
key = g_strdup (buffer);