From: Jens Axboe Date: Wed, 9 Nov 2005 10:56:40 +0000 (+0100) Subject: [PATCH] fio: strip whitespace at the end as well in check_strstore() X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1c624e2e61be9b363930dc0ae42ab1f2c90a5892;p=disktools.git [PATCH] fio: strip whitespace at the end as well in check_strstore() --- diff --git a/fio.c b/fio.c index 17db507..0cc8914 100644 --- a/fio.c +++ b/fio.c @@ -2007,6 +2007,13 @@ static int check_strstore(char *p, char *name, char *dest) s++; strcpy(dest, s); + + s = dest + strlen(dest) - 1; + while (isblank(*s)) { + *s = '\0'; + s--; + } + return 0; }