libpwdgrp: line counting in error meesages is broken, remove it
authorTito Ragusa <farmatito@tiscali.it>
Tue, 6 Jan 2015 00:22:36 +0000 (01:22 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 6 Jan 2015 00:22:36 +0000 (01:22 +0100)
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libpwdgrp/pwd_grp.c

index 524acfeab916937130746295554719b478115975..90647e9d3a22b838587f7adde96b07afc1c4dd07 100644 (file)
@@ -189,17 +189,15 @@ static int tokenize(char *buffer, int ch)
 static char *parse_common(FILE *fp, struct passdb *db,
                const char *key, int field_pos)
 {
-       int count = 0;
        char *buf;
 
        while ((buf = xmalloc_fgetline(fp)) != NULL) {
-               count++;
                /* Skip empty lines, comment lines */
                if (buf[0] == '\0' || buf[0] == '#')
                        goto free_and_next;
                if (tokenize(buf, ':') != db->numfields) {
                        /* number of fields is wrong */
-                       bb_error_msg("bad record at %s:%u", db->filename, count);
+                       bb_error_msg("%s: bad record", db->filename);
                        goto free_and_next;
                }