[asterisk-commits] tilghman: branch 1.4 r287933 - /branches/1.4/main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 21 14:07:11 CDT 2010


Author: tilghman
Date: Tue Sep 21 14:07:07 2010
New Revision: 287933

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=287933
Log:
Less than zero is an error, not any non-zero value.

Modified:
    branches/1.4/main/asterisk.c

Modified: branches/1.4/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/asterisk.c?view=diff&rev=287933&r1=287932&r2=287933
==============================================================================
--- branches/1.4/main/asterisk.c (original)
+++ branches/1.4/main/asterisk.c Tue Sep 21 14:07:07 2010
@@ -2915,7 +2915,7 @@
 		}
 
 		fd2 = (l.rlim_cur > sizeof(readers) * 8 ? sizeof(readers) * 8 : l.rlim_cur) - 1;
-		if (dup2(fd, fd2)) {
+		if (dup2(fd, fd2) < 0) {
 			ast_log(LOG_WARNING, "Cannot open maximum file descriptor %d at boot? %s\n", fd2, strerror(errno));
 			break;
 		}




More information about the asterisk-commits mailing list