libmultipath: config parser: don't strip whitepace between quotes
authorMartin Wilck <mwilck@suse.com>
Wed, 7 Mar 2018 23:26:17 +0000 (00:26 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 10 Mar 2018 07:24:12 +0000 (08:24 +0100)
Between double quotes, the parser currently strips leading (but not
trailing) whitespace. That's inconsistent and unexpected. Fix it.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/parser.c

index 5caa201..3d9656f 100644 (file)
@@ -262,7 +262,8 @@ alloc_strvec(char *string)
                }
                vector_set_slot(strvec, token);
 
-               while ((isspace((int) *cp) || !isascii((int) *cp))
+               while ((!in_string &&
+                       (isspace((int) *cp) || !isascii((int) *cp)))
                       && *cp != '\0')
                        cp++;
                if (*cp == '\0' || *cp == '!' || *cp == '#')