[asterisk-commits] qwell: branch 1.4 r101822 - /branches/1.4/apps/app_authenticate.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 1 11:41:40 CST 2008


Author: qwell
Date: Fri Feb  1 11:41:40 2008
New Revision: 101822

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101822
Log:
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.

Modified:
    branches/1.4/apps/app_authenticate.c

Modified: branches/1.4/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_authenticate.c?view=diff&rev=101822&r1=101821&r2=101822
==============================================================================
--- branches/1.4/apps/app_authenticate.c (original)
+++ branches/1.4/apps/app_authenticate.c Fri Feb  1 11:41:40 2008
@@ -168,7 +168,7 @@
 
 					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';




More information about the asterisk-commits mailing list