[PATCH] fix comment and whitespace handling in config files.
This chunk broke parsing of blank lines and comments with blanks before '#'. Please revert it with the patch below. Roman.
This commit is contained in:
parent
1b1dbc47a3
commit
093bf8f4d2
|
@ -158,6 +158,10 @@ int namedev_init_rules(void)
|
||||||
lineno++;
|
lineno++;
|
||||||
dbg_parse("read '%s'", temp);
|
dbg_parse("read '%s'", temp);
|
||||||
|
|
||||||
|
/* eat the whitespace */
|
||||||
|
while (isspace(*temp))
|
||||||
|
++temp;
|
||||||
|
|
||||||
/* empty line? */
|
/* empty line? */
|
||||||
if (*temp == 0x00)
|
if (*temp == 0x00)
|
||||||
continue;
|
continue;
|
||||||
|
@ -166,10 +170,6 @@ int namedev_init_rules(void)
|
||||||
if (*temp == COMMENT_CHARACTER)
|
if (*temp == COMMENT_CHARACTER)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* eat the whitespace */
|
|
||||||
while (isspace(*temp))
|
|
||||||
++temp;
|
|
||||||
|
|
||||||
memset(&dev, 0x00, sizeof(struct config_device));
|
memset(&dev, 0x00, sizeof(struct config_device));
|
||||||
|
|
||||||
/* get the method */
|
/* get the method */
|
||||||
|
|
Loading…
Reference in New Issue