summaryrefslogtreecommitdiff
path: root/namedev_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'namedev_parse.c')
-rw-r--r--namedev_parse.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/namedev_parse.c b/namedev_parse.c
index 4bb1a97ce9..7e37833202 100644
--- a/namedev_parse.c
+++ b/namedev_parse.c
@@ -182,15 +182,13 @@ static int namedev_parse_rules(char *filename)
continue;
}
- /* empty line? */
- if (bufline[0] == '\0' || bufline[0] == '\n')
- continue;
-
/* eat the whitespace */
- while (isspace(bufline[0])) {
+ while ((count > 0) && isspace(bufline[0])) {
bufline++;
count--;
}
+ if (count == 0)
+ continue;
/* see if this is a comment */
if (bufline[0] == COMMENT_CHARACTER)
@@ -381,15 +379,13 @@ static int namedev_parse_permissions(char *filename)
continue;
}
- /* empty line? */
- if (bufline[0] == '\0' || bufline[0] == '\n')
- continue;
-
/* eat the whitespace */
- while (isspace(bufline[0])) {
+ while ((count > 0) && isspace(bufline[0])) {
bufline++;
count--;
}
+ if (count == 0)
+ continue;
/* see if this is a comment */
if (bufline[0] == COMMENT_CHARACTER)