mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 19:38:22 +00:00
Remove a needless (and incorrect) call to feof() after fgets().
This would have exited the loop early if you had an authentication file with no newline at the end. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -168,7 +168,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
while (!feof(f)) {
|
while (!feof(f)) {
|
||||||
fgets(buf, sizeof(buf), f);
|
fgets(buf, sizeof(buf), f);
|
||||||
if (!feof(f) && !ast_strlen_zero(buf)) {
|
if (!ast_strlen_zero(buf)) {
|
||||||
size_t len = strlen(buf);
|
size_t len = strlen(buf);
|
||||||
if (buf[len - 1] == '\n')
|
if (buf[len - 1] == '\n')
|
||||||
buf[len - 1] = '\0';
|
buf[len - 1] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user