summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-03-06 20:29:29 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-03-06 20:29:29 +0100
commit853ee7fc686293cd45fbb177c75114ed2489144d (patch)
tree9169606125c61e145a2b4097ebf817308cc2ae3c
parent9d7dfdaef1ed5f6227fd31117d310ac15ae63152 (diff)
downloadfio-853ee7fc686293cd45fbb177c75114ed2489144d.tar.gz
fio-853ee7fc686293cd45fbb177c75114ed2489144d.tar.bz2
Fix failure to strip end of line with comment
We left a space at the end, which confused the postfix checking. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index f838a1f6..d653f5e4 100644
--- a/parse.c
+++ b/parse.c
@@ -152,7 +152,7 @@ void strip_blank_front(char **p)
void strip_blank_end(char *p)
{
- char *s;
+ char *start = p, *s;
s = strchr(p, ';');
if (s)
@@ -164,7 +164,7 @@ void strip_blank_end(char *p)
p = s;
s = p + strlen(p);
- while ((isspace(*s) || iscntrl(*s)) && (s > p))
+ while ((isspace(*s) || iscntrl(*s)) && (s > start))
s--;
*(s + 1) = '\0';