Avoid isspace('\0').
This commit is contained in:
@@ -65,10 +65,12 @@ init_sysinfo (glibtop *server)
|
|||||||
p = strchr (buffer, ':');
|
p = strchr (buffer, ':');
|
||||||
if (!p) continue;
|
if (!p) continue;
|
||||||
|
|
||||||
|
/* Remove leading spaces from `p'. */
|
||||||
*p = '\0'; start = p; p++;
|
*p = '\0'; start = p; p++;
|
||||||
while (isspace (*p)) p++;
|
while (isspace (*p)) p++;
|
||||||
|
|
||||||
while ((start > buffer) && isspace (*start))
|
/* Remove trailing spaces from `buffer'. */
|
||||||
|
while ((start > buffer) && (*start) && isspace (*start))
|
||||||
*start-- = '\0';
|
*start-- = '\0';
|
||||||
|
|
||||||
key = g_strdup (buffer);
|
key = g_strdup (buffer);
|
||||||
|
Reference in New Issue
Block a user