From: Lennart Poettering Date: Sat, 14 Apr 2007 22:38:15 +0000 (+0000) Subject: Remove an invalid optimization in avahi_simple_poll_run(). (Closes #132) X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=2635b54ef09173bbf72072436fad7d1e1fca3bc9;p=catta Remove an invalid optimization in avahi_simple_poll_run(). (Closes #132) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1425 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c index 65d9d18..c970c3c 100644 --- a/avahi-common/simple-watch.c +++ b/avahi-common/simple-watch.c @@ -523,17 +523,13 @@ int avahi_simple_poll_run(AvahiSimplePoll *s) { s->state = STATE_RUNNING; - if (s->prepared_timeout != 0) { - - if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) { - s->state = STATE_FAILURE; - return -1; - } + if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) { + s->state = STATE_FAILURE; + return -1; + } - /* The poll events are now valid again */ - s->events_valid = 1; - } else - s->events_valid = 0; + /* The poll events are now valid again */ + s->events_valid = 1; /* Update state */ s->state = STATE_RAN;