From 387f2851110204c96ca5a5b408050437a46a21bf Mon Sep 17 00:00:00 2001 From: dreid Date: Sat, 22 Nov 2003 10:53:46 +0000 Subject: 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 --- poll/unix/poll.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'poll') 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; } -- cgit v1.2.1