summaryrefslogtreecommitdiff
path: root/namedev_parse.c
diff options
context:
space:
mode:
authorRoman.Kagan@itep.ru <Roman.Kagan@itep.ru>2003-12-17 18:24:05 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:09 -0700
commit093bf8f4d2c44fb1f581dfec0330f3f86473496c (patch)
treee0b6f4bf3ec48faec3beacf274e4dde71514d38a /namedev_parse.c
parent1b1dbc47a3b1b227273c7ed5074a6376efc7526e (diff)
[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.
Diffstat (limited to 'namedev_parse.c')
-rw-r--r--namedev_parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/namedev_parse.c b/namedev_parse.c
index 9cd96a6224..33e0c89e22 100644
--- a/namedev_parse.c
+++ b/namedev_parse.c
@@ -158,6 +158,10 @@ int namedev_init_rules(void)
lineno++;
dbg_parse("read '%s'", temp);
+ /* eat the whitespace */
+ while (isspace(*temp))
+ ++temp;
+
/* empty line? */
if (*temp == 0x00)
continue;
@@ -166,10 +170,6 @@ int namedev_init_rules(void)
if (*temp == COMMENT_CHARACTER)
continue;
- /* eat the whitespace */
- while (isspace(*temp))
- ++temp;
-
memset(&dev, 0x00, sizeof(struct config_device));
/* get the method */