summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-09-18 04:05:10 +0200
committerLennart Poettering <lennart@poettering.net>2009-09-18 04:14:37 +0200
commitfb4a2a1bbbd35601b5da62037c1cee40be859428 (patch)
treea35e6f616a13a408a63c79921fd0080b47d31f5f
parent18d69c5d9d04d81135f078d7f49bad3214418622 (diff)
mainloop: sum up dispatched events in an unsigned to clarify range
-rw-r--r--src/pulse/mainloop.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 67f095be..62659d89 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -657,9 +657,9 @@ static void rebuild_pollfds(pa_mainloop *m) {
m->rebuild_pollfds = FALSE;
}
-static int dispatch_pollfds(pa_mainloop *m) {
+static unsigned dispatch_pollfds(pa_mainloop *m) {
pa_io_event *e;
- int r = 0, k;
+ unsigned r = 0, k;
pa_assert(m->poll_func_ret > 0);
@@ -685,9 +685,9 @@ static int dispatch_pollfds(pa_mainloop *m) {
return r;
}
-static int dispatch_defer(pa_mainloop *m) {
+static unsigned dispatch_defer(pa_mainloop *m) {
pa_defer_event *e;
- int r = 0;
+ unsigned r = 0;
if (m->n_enabled_defer_events <= 0)
return 0;
@@ -753,10 +753,10 @@ static pa_usec_t calc_next_timeout(pa_mainloop *m) {
return t->time - clock_now;
}
-static int dispatch_timeout(pa_mainloop *m) {
+static unsigned dispatch_timeout(pa_mainloop *m) {
pa_time_event *e;
pa_usec_t now;
- int r = 0;
+ unsigned r = 0;
pa_assert(m);
if (m->n_enabled_time_events <= 0)
@@ -903,7 +903,7 @@ quit:
}
int pa_mainloop_dispatch(pa_mainloop *m) {
- int dispatched = 0;
+ unsigned dispatched = 0;
pa_assert(m);
pa_assert(m->state == STATE_POLLED);
@@ -929,7 +929,7 @@ int pa_mainloop_dispatch(pa_mainloop *m) {
m->state = STATE_PASSIVE;
- return dispatched;
+ return (int) dispatched;
quit:
m->state = STATE_QUIT;
@@ -938,6 +938,7 @@ quit:
int pa_mainloop_get_retval(pa_mainloop *m) {
pa_assert(m);
+
return m->retval;
}