diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-12-08 08:31:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:11 -0500 |
commit | 91abd131e63087b3e7239f7b58542a2f08e4bd66 (patch) | |
tree | d244c2f63c131738e7474660248e09ba95a73d8f /source4/lib/events/events_standard.c | |
parent | 35cb1931ed1ceb468694bb825ac4e8656f57fefb (diff) | |
download | samba-91abd131e63087b3e7239f7b58542a2f08e4bd66.tar.gz samba-91abd131e63087b3e7239f7b58542a2f08e4bd66.tar.bz2 samba-91abd131e63087b3e7239f7b58542a2f08e4bd66.zip |
r12123: handle fde == NULL at the correct level
metze
(This used to be commit 1dd5bb60a5047b94034eb084473bb8f4a9926e7c)
Diffstat (limited to 'source4/lib/events/events_standard.c')
-rw-r--r-- | source4/lib/events/events_standard.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c index d521ffa344..1a3bdc1e16 100644 --- a/source4/lib/events/events_standard.c +++ b/source4/lib/events/events_standard.c @@ -240,7 +240,7 @@ static struct fd_event *std_event_add_fd(struct event_context *ev, TALLOC_CTX *m */ static uint16_t std_event_get_fd_flags(struct fd_event *fde) { - return fde?fde->flags:0; + return fde->flags; } /* @@ -251,8 +251,7 @@ static void std_event_set_fd_flags(struct fd_event *fde, uint16_t flags) #if WITH_EPOLL struct event_context *ev; struct std_event_context *std_ev; - if (fde == NULL || - fde->flags == flags) { + if (fde->flags == flags) { return; } ev = fde->event_ctx; @@ -267,9 +266,7 @@ static void std_event_set_fd_flags(struct fd_event *fde, uint16_t flags) } } #endif - if (fde) { - fde->flags = flags; - } + fde->flags = flags; } /* |