diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-08 07:25:25 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-08 07:25:25 +0400 |
commit | 493829207c1c2a36d55aaa13abf806533d0cb87f (patch) | |
tree | 5881b8454284b35ccd31cc0620178a4eff3f52d2 /networking/ifupdown.c | |
parent | 5d62462a8c7d911fae7d4711be21faf8b8973a09 (diff) |
ifupdown: /etc/network/interfaces can have comments with leading blanks
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r-- | networking/ifupdown.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index af7bb6e17..2b5e8a14e 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -675,7 +675,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename) * the last character a backslash. * * Seen elsewhere in example config file: - * A "#" character in the very first column makes the rest of the line + * A first non-blank "#" character makes the rest of the line * be ignored. Blank lines are ignored. Lines may be indented freely. * A "\" character at the very end of the line indicates the next line * should be treated as a continuation of the current one. @@ -711,7 +711,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename) #endif rest_of_line = buf; first_word = next_word(&rest_of_line); - if (!first_word || *buf == '#') { + if (!first_word || *first_word == '#') { free(buf); continue; /* blank/comment line */ } |