From ae1b20881ecab1508207538fe7dba48d03892f46 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sun, 11 Nov 2018 14:34:51 +0100 Subject: [PATCH] Use isspace to test for whitespace --- src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index 34f7265..ef29cee 100644 --- a/src/utils.c +++ b/src/utils.c @@ -2,6 +2,7 @@ #include "utils.h" #include +#include #include #include #include @@ -134,7 +135,6 @@ char *string_to_path(char *string) gint64 string_to_time(const char *string) { - assert(string); errno = 0; @@ -155,7 +155,7 @@ gint64 string_to_time(const char *string) } // endptr may point to a separating space - while (*endptr == ' ') + while (isspace(*endptr)) endptr++; if (STRN_EQ(endptr, "ms", 2))