aboutsummaryrefslogtreecommitdiffstats
path: root/main/poll.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-03 14:56:56 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-03 14:56:56 +0000
commit7ed78f04b53d344afa90ce0c0a51c749e2a3807f (patch)
tree4681a61e84c40398770f7f2d1bd83be1eb5aeafb /main/poll.c
parente4ad898ea5bf4d5c7739eb10543a795160077dcb (diff)
parentea098db1f6eee69e908ec28c078cee1e5f0815a3 (diff)
Creating tag for the release of asterisk-1.6.0-rc4
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.6.0-rc4@140897 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/poll.c')
-rw-r--r--main/poll.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/poll.c b/main/poll.c
index 731dbcefb..823d0cbd4 100644
--- a/main/poll.c
+++ b/main/poll.c
@@ -268,19 +268,19 @@ int poll
fd_set except_descs; /* exception descs */
struct timeval stime; /* select() timeout value */
int ready_descriptors; /* function result */
- int max_fd; /* maximum fd value */
+ int max_fd = 0; /* maximum fd value */
struct timeval *pTimeout; /* actually passed */
FD_ZERO (&read_descs);
FD_ZERO (&write_descs);
FD_ZERO (&except_descs);
- assert(pArray != (struct pollfd *) NULL);
-
/* Map the poll() file descriptor list in the select() data structures. */
- max_fd = map_poll_spec(pArray, n_fds,
- &read_descs, &write_descs, &except_descs);
+ if (pArray) {
+ max_fd = map_poll_spec (pArray, n_fds,
+ &read_descs, &write_descs, &except_descs);
+ }
/* Map the poll() timeout value in the select() timeout structure. */
pTimeout = map_timeout(timeout, &stime);