aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTito Ragusa <farmatito@tiscali.it>2015-01-06 01:22:36 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2015-01-06 01:22:36 +0100
commite5cae08f1232e66daca8f47f0f257a83a0cca9fa (patch)
tree3384ee0d3b80d6c7656755a017dd231423733578
parente76957708b6a158fd25f7298a4bf2cc5583a974a (diff)
downloadbusybox-w32-e5cae08f1232e66daca8f47f0f257a83a0cca9fa.tar.gz
busybox-w32-e5cae08f1232e66daca8f47f0f257a83a0cca9fa.tar.bz2
busybox-w32-e5cae08f1232e66daca8f47f0f257a83a0cca9fa.zip
libpwdgrp: line counting in error meesages is broken, remove it
Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libpwdgrp/pwd_grp.c4
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)
189static char *parse_common(FILE *fp, struct passdb *db, 189static 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