https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r287933 | tilghman | 2010-09-21 14:07:07 -0500 (Tue, 21 Sep 2010) | 2 lines
Less than zero is an error, not any non-zero value.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@287934
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
}
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;
}