X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-common%2Fsimple-watch.c;h=c970c3c4afdb5fedd9d2f1d5aaa9f17889bb5d70;hb=b177bc98ac5b0e8b59f00becffadda7ceeb32553;hp=65d9d18919ce46c6f0ceb009135d75ee6ea97ab1;hpb=854f901f491ccda79aee11edc3d59109cb229d28;p=catta 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;