Only do the root warning once per thread
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index 9015b1d72bd5a527ef36ed0db12646ce01fcc945..f0e644f113bf63171fbebc8e0bd2545ae5d0fcd8 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -159,8 +159,8 @@ void strip_blank_end(char *p)
        if (s)
                p = s;
 
-       s = p + strlen(p) - 1;
-       while (isspace(*s) || iscntrl(*s))
+       s = p + strlen(p);
+       while ((isspace(*s) || iscntrl(*s)) && (s > p))
                s--;
 
        *(s + 1) = '\0';