diff options
author | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2003-11-22 10:53:46 +0000 |
---|---|---|
committer | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2003-11-22 10:53:46 +0000 |
commit | 387f2851110204c96ca5a5b408050437a46a21bf (patch) | |
tree | b31ae728d47a840eb9e9793e18e87138e1b819a0 /poll | |
parent | c594c00e77056ae8111d1532baaab2026a08180b (diff) | |
download | libapr-387f2851110204c96ca5a5b408050437a46a21bf.tar.gz |
This small fix allows for the passing of NULL as the descriptors arg in
apr_pollset_poll. Basically if we have a single item pollset then we
don't need to have the descriptors arg set as the return value is sufficient.
I haven't added this for OS/2 as Brian may be moving the code into a
seperate file again.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64788 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r-- | poll/unix/poll.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/poll/unix/poll.c b/poll/unix/poll.c index bbc4269d8..b90a05815 100644 --- a/poll/unix/poll.c +++ b/poll/unix/poll.c @@ -542,7 +542,8 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, j++; } } - *descriptors = pollset->result_set; + if (descriptors) + *descriptors = pollset->result_set; return APR_SUCCESS; } @@ -616,7 +617,8 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, } } - *descriptors = pollset->result_set; + if (descriptors) + *descriptors = pollset->result_set; return APR_SUCCESS; } |