diff options
author | rooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68> | 2004-12-06 02:55:31 +0000 |
---|---|---|
committer | rooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68> | 2004-12-06 02:55:31 +0000 |
commit | c7e65ed0e02170e77d84bb1b4f767668a088f8f3 (patch) | |
tree | 0f8ab2ad854c3af1edded99363674c0c2bcf5577 | |
parent | 9fb50bd2b93d17ca36cf3b4a707f29504c52e823 (diff) | |
download | libapr-c7e65ed0e02170e77d84bb1b4f767668a088f8f3.tar.gz |
Fix some style problems in the poll code, no functional changes.
* include/arch/unix/apr_arch_poll_private.h
(pollset_lock_rings, pollset_unlock_rings): add a space after the if.
* poll/unix/port.c
(apr_pollset_remove): add a space after an if.
(apr_pollset_poll): wrap a long line, add a space after an if, remove some
extraneous parentheses that caused a long line to go past 80 columns.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@109938 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/arch/unix/apr_arch_poll_private.h | 4 | ||||
-rw-r--r-- | poll/unix/port.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/include/arch/unix/apr_arch_poll_private.h b/include/arch/unix/apr_arch_poll_private.h index c720bb2f1..f77585f7d 100644 --- a/include/arch/unix/apr_arch_poll_private.h +++ b/include/arch/unix/apr_arch_poll_private.h @@ -77,10 +77,10 @@ #if APR_HAS_THREADS #include "apr_thread_mutex.h" #define pollset_lock_rings() \ - if(pollset->flags & APR_POLLSET_THREADSAFE) \ + if (pollset->flags & APR_POLLSET_THREADSAFE) \ apr_thread_mutex_lock(pollset->ring_lock); #define pollset_unlock_rings() \ - if(pollset->flags & APR_POLLSET_THREADSAFE) \ + if (pollset->flags & APR_POLLSET_THREADSAFE) \ apr_thread_mutex_unlock(pollset->ring_lock); #else #define pollset_lock_rings() diff --git a/poll/unix/port.c b/poll/unix/port.c index 4ab6386e6..056579e2d 100644 --- a/poll/unix/port.c +++ b/poll/unix/port.c @@ -203,7 +203,7 @@ APR_DECLARE(apr_status_t) apr_pollset_remove(apr_pollset_t *pollset, res = port_dissociate(pollset->port_fd, PORT_SOURCE_FD, fd); - if(res < 0) { + if (res < 0) { rv = APR_NOTFOUND; } @@ -284,13 +284,14 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, pollset_unlock_rings(); - ret = port_getn(pollset->port_fd, pollset->port_set, pollset->nalloc, &nget, tvptr); + ret = port_getn(pollset->port_fd, pollset->port_set, pollset->nalloc, + &nget, tvptr); (*num) = nget; if (ret == -1) { (*num) = 0; - if(errno == ETIME || errno == EINTR) { + if (errno == ETIME || errno == EINTR) { rv = APR_TIMEUP; } else { @@ -309,7 +310,7 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, get_revent(pollset->port_set[i].portev_events); APR_RING_INSERT_TAIL(&(pollset->add_ring), - ((pfd_elem_t*)(pollset->port_set[i].portev_user)), + (pfd_elem_t*)pollset->port_set[i].portev_user, pfd_elem_t, link); } |