]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Remove a needless (and incorrect) call to feof() after fgets().
authorJason Parker <jparker@digium.com>
Fri, 1 Feb 2008 17:41:40 +0000 (17:41 +0000)
committerJason Parker <jparker@digium.com>
Fri, 1 Feb 2008 17:41:40 +0000 (17:41 +0000)
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

apps/app_authenticate.c

index b6ccffce54f53fe019cac7d11fd4031f786d6633..56f53b8ad6df614815039187bc34884d77ef353e 100644 (file)
@@ -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';