summaryrefslogtreecommitdiffstats
path: root/lib/tevent
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-12-11 18:58:41 +0100
committerStefan Metzmacher <metze@samba.org>2013-12-11 22:46:09 +0100
commit36345d44c8f5ac614f40a9b5bd4b421ffa6cd49a (patch)
tree758aa2d5d53452508ebc9bec56c5f44493cfd8bb /lib/tevent
parent4cc02d7c84e6c6a07ecde02fc6792ed041bdbe3a (diff)
downloadsamba-36345d44c8f5ac614f40a9b5bd4b421ffa6cd49a.tar.gz
samba-36345d44c8f5ac614f40a9b5bd4b421ffa6cd49a.tar.xz
samba-36345d44c8f5ac614f40a9b5bd4b421ffa6cd49a.zip
tevent: tevent_epoll_set_panic_fallback() can be a void function
There's no case where this could return an error. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'lib/tevent')
-rw-r--r--lib/tevent/tevent_epoll.c2
-rw-r--r--lib/tevent/tevent_internal.h2
-rw-r--r--lib/tevent/tevent_standard.c5
3 files changed, 3 insertions, 6 deletions
diff --git a/lib/tevent/tevent_epoll.c b/lib/tevent/tevent_epoll.c
index 951fa42bff..b0d15c8b01 100644
--- a/lib/tevent/tevent_epoll.c
+++ b/lib/tevent/tevent_epoll.c
@@ -116,7 +116,7 @@ static int epoll_wait_panic_fallback(struct epoll_event_context *epoll_ev,
/*
called to set the panic fallback function.
*/
-_PRIVATE_ bool tevent_epoll_set_panic_fallback(struct tevent_context *ev,
+_PRIVATE_ void tevent_epoll_set_panic_fallback(struct tevent_context *ev,
bool (*panic_fallback)(struct tevent_context *ev,
bool replay))
{
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h
index b239e7403a..df7328864d 100644
--- a/lib/tevent/tevent_internal.h
+++ b/lib/tevent/tevent_internal.h
@@ -335,7 +335,7 @@ void tevent_poll_event_add_fd_internal(struct tevent_context *ev,
bool tevent_poll_mt_init(void);
#ifdef HAVE_EPOLL
bool tevent_epoll_init(void);
-bool tevent_epoll_set_panic_fallback(struct tevent_context *ev,
+void tevent_epoll_set_panic_fallback(struct tevent_context *ev,
bool (*panic_fallback)(struct tevent_context *ev,
bool replay));
#endif
diff --git a/lib/tevent/tevent_standard.c b/lib/tevent/tevent_standard.c
index 258499484a..785d68d99f 100644
--- a/lib/tevent/tevent_standard.c
+++ b/lib/tevent/tevent_standard.c
@@ -206,10 +206,7 @@ static int std_event_context_init(struct tevent_context *ev)
goto fallback;
}
#ifdef HAVE_EPOLL
- if (!tevent_epoll_set_panic_fallback(ev, std_fallback_to_poll)) {
- TALLOC_FREE(ev->additional_data);
- goto fallback;
- }
+ tevent_epoll_set_panic_fallback(ev, std_fallback_to_poll);
#endif
return ret;