diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-04-14 22:38:15 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-04-14 22:38:15 +0000 |
commit | 2635b54ef09173bbf72072436fad7d1e1fca3bc9 (patch) | |
tree | 276a79afc3b5bdf218eb9271e4be51e0ffe52bec /avahi-common | |
parent | 758381efbaa40d604253259cd43f194db1162859 (diff) |
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
Diffstat (limited to 'avahi-common')
-rw-r--r-- | avahi-common/simple-watch.c | 16 |
1 files changed, 6 insertions, 10 deletions
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; |