diff options
| author | Milind Changire <mchangir@redhat.com> | 2019-02-15 14:20:07 +0530 |
|---|---|---|
| committer | Amar Tumballi <amarts@redhat.com> | 2019-02-18 02:45:40 +0000 |
| commit | 776ba851c6ee6c265253d44cf1d6e4e3d4a21772 (patch) | |
| tree | 045cc2bd91b72048bc8a54eac67b3e605c85e3ae /libglusterfs/src/event-poll.c | |
| parent | fc133767e5ed705f246547cdfa5b7a2db5dcd53f (diff) | |
socket: socket event handlers now return void
Problem:
Returning any value from socket event handlers to the event sub-system
doesn't make sense since event sub-system cannot handle socket
sub-system errors.
Solution:
Change return type of all socket event handlers to 'void'
Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f
Fixes: bz#1651246
Signed-off-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'libglusterfs/src/event-poll.c')
| -rw-r--r-- | libglusterfs/src/event-poll.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libglusterfs/src/event-poll.c b/libglusterfs/src/event-poll.c index 735ec2e020c..14dc5e3180c 100644 --- a/libglusterfs/src/event-poll.c +++ b/libglusterfs/src/event-poll.c @@ -35,7 +35,7 @@ event_register_poll(struct event_pool *event_pool, int fd, event_handler_t handler, void *data, int poll_in, int poll_out, char notify_poller_death); -static int +static void __flush_fd(int fd, int idx, int gen, void *data, int poll_in, int poll_out, int poll_err, char event_thread_died) { @@ -43,7 +43,7 @@ __flush_fd(int fd, int idx, int gen, void *data, int poll_in, int poll_out, int ret = -1; if (!poll_in) - return ret; + return; do { ret = sys_read(fd, buf, 64); @@ -55,7 +55,7 @@ __flush_fd(int fd, int idx, int gen, void *data, int poll_in, int poll_out, } } while (ret == 64); - return ret; + return; } static int @@ -375,10 +375,10 @@ unlock: pthread_mutex_unlock(&event_pool->mutex); if (handler) - ret = handler(ufds[i].fd, idx, 0, data, - (ufds[i].revents & (POLLIN | POLLPRI)), - (ufds[i].revents & (POLLOUT)), - (ufds[i].revents & (POLLERR | POLLHUP | POLLNVAL)), 0); + handler(ufds[i].fd, idx, 0, data, + (ufds[i].revents & (POLLIN | POLLPRI)), + (ufds[i].revents & (POLLOUT)), + (ufds[i].revents & (POLLERR | POLLHUP | POLLNVAL)), 0); return ret; } |
