From f8e52e4a318b33c0f93237d8466ed6e7beda84d3 Mon Sep 17 00:00:00 2001 From: qwell Date: Fri, 1 Feb 2008 17:41:40 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/branches/1.4@101822 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_authenticate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/app_authenticate.c') diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c index b6ccffce5..56f53b8ad 100644 --- a/apps/app_authenticate.c +++ b/apps/app_authenticate.c @@ -168,7 +168,7 @@ static int auth_exec(struct ast_channel *chan, void *data) while (!feof(f)) { fgets(buf, sizeof(buf), f); - if (!feof(f) && !ast_strlen_zero(buf)) { + if (!ast_strlen_zero(buf)) { size_t len = strlen(buf); if (buf[len - 1] == '\n') buf[len - 1] = '\0'; -- cgit v1.2.3