diff options
author | Georg Chini <georg@chini.tk> | 2017-04-17 19:48:37 +0200 |
---|---|---|
committer | Georg Chini <georg@chini.tk> | 2017-04-17 19:48:37 +0200 |
commit | a5fccd4645729c06db2caccb67149f2e07598300 (patch) | |
tree | 9b32922ef33a354aa37ffec0637f2d43c29c5231 | |
parent | 65f7ca44148e8c79fa965a6ecbc889e3f9668178 (diff) | |
download | pulseaudio-a5fccd4645729c06db2caccb67149f2e07598300.tar.gz |
source/sink: Don't let pa_{sink, source}_get_latency_within_thread() return -1 if process_msg() fails
None of the callers checks the return value anyway. Return the offset only
if message processing fails. This is in preparation for the next patch.
-rw-r--r-- | src/pulsecore/sink.c | 3 | ||||
-rw-r--r-- | src/pulsecore/source.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 396894371..a6a3a2fbc 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -1549,8 +1549,7 @@ pa_usec_t pa_sink_get_latency_within_thread(pa_sink *s) { /* FIXME: We probably should make this a proper vtable callback instead of going through process_msg() */ - if (o->process_msg(o, PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0) - return -1; + o->process_msg(o, PA_SINK_MESSAGE_GET_LATENCY, &usec, 0, NULL); /* usec is unsigned, so check that the offset can be added to usec without * underflowing. */ diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 142508255..12aa19d18 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -1144,8 +1144,7 @@ pa_usec_t pa_source_get_latency_within_thread(pa_source *s) { /* FIXME: We probably should make this a proper vtable callback instead of going through process_msg() */ - if (o->process_msg(o, PA_SOURCE_MESSAGE_GET_LATENCY, &usec, 0, NULL) < 0) - return -1; + o->process_msg(o, PA_SOURCE_MESSAGE_GET_LATENCY, &usec, 0, NULL); /* usec is unsigned, so check that the offset can be added to usec without * underflowing. */ |