diff options
-rw-r--r-- | libpwdgrp/pwd_grp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c index 524acfeab..90647e9d3 100644 --- a/libpwdgrp/pwd_grp.c +++ b/libpwdgrp/pwd_grp.c | |||
@@ -189,17 +189,15 @@ static int tokenize(char *buffer, int ch) | |||
189 | static char *parse_common(FILE *fp, struct passdb *db, | 189 | static char *parse_common(FILE *fp, struct passdb *db, |
190 | const char *key, int field_pos) | 190 | const char *key, int field_pos) |
191 | { | 191 | { |
192 | int count = 0; | ||
193 | char *buf; | 192 | char *buf; |
194 | 193 | ||
195 | while ((buf = xmalloc_fgetline(fp)) != NULL) { | 194 | while ((buf = xmalloc_fgetline(fp)) != NULL) { |
196 | count++; | ||
197 | /* Skip empty lines, comment lines */ | 195 | /* Skip empty lines, comment lines */ |
198 | if (buf[0] == '\0' || buf[0] == '#') | 196 | if (buf[0] == '\0' || buf[0] == '#') |
199 | goto free_and_next; | 197 | goto free_and_next; |
200 | if (tokenize(buf, ':') != db->numfields) { | 198 | if (tokenize(buf, ':') != db->numfields) { |
201 | /* number of fields is wrong */ | 199 | /* number of fields is wrong */ |
202 | bb_error_msg("bad record at %s:%u", db->filename, count); | 200 | bb_error_msg("%s: bad record", db->filename); |
203 | goto free_and_next; | 201 | goto free_and_next; |
204 | } | 202 | } |
205 | 203 | ||