From: Alan T. DeKok Date: Tue, 14 Jul 2015 00:53:56 +0000 (-0400) Subject: Set lineno correctly X-Git-Tag: release_3_0_10~344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f97b91b555df4b17f5cbb63e311428f010f09e0f;p=thirdparty%2Ffreeradius-server.git Set lineno correctly --- diff --git a/src/main/files.c b/src/main/files.c index bf8cdf5dc23..58f72d6efa2 100644 --- a/src/main/files.c +++ b/src/main/files.c @@ -89,7 +89,7 @@ int pairlist_read(TALLOC_CTX *ctx, char const *file, PAIR_LIST **list, int compl PAIR_LIST *pl = NULL, *t; PAIR_LIST **last = &pl; int lineno = 0; - int old_lineno = 0; + int entry_lineno = 0; FR_TOKEN parsecode; #ifdef HAVE_REGEX_H VALUE_PAIR *vp; @@ -150,7 +150,7 @@ parse_again: */ ptr = buffer; getword(&ptr, entry, sizeof(entry), false); - old_lineno = lineno; + entry_lineno = lineno; /* * Include another file if we see @@ -277,7 +277,7 @@ parse_again: talloc_free(check_tmp); talloc_free(reply_tmp); ERROR("%s[%d]: Invalid comma after the reply attributes. Please delete it.", - file, old_lineno); + file, lineno); fclose(fp); return -1; } @@ -288,7 +288,6 @@ parse_again: */ parsecode = userparse(ctx, buffer, &reply_tmp); if (parsecode == T_COMMA) { - old_lineno = lineno; continue; } @@ -316,7 +315,7 @@ parse_again: t->check = check_tmp; t->reply = reply_tmp; - t->lineno = old_lineno; + t->lineno = entry_lineno; check_tmp = NULL; reply_tmp = NULL;