diff options
author | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-12-03 16:45:45 +0200 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2014-01-08 21:26:39 +0200 |
commit | dfa3c507001d583574a04cf87ed1f0123553ddac (patch) | |
tree | f88700e7b0ef0840dc4a90004b06e822174ab434 /src/pulse | |
parent | 3a5a0f6652c749f42ba3757fd563a3ff7b6b35af (diff) |
format: Simplify pa_format_info_to_sample_spec()
Diffstat (limited to 'src/pulse')
-rw-r--r-- | src/pulse/format.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/pulse/format.c b/src/pulse/format.c index 4f4b3425d..9b42cdbda 100644 --- a/src/pulse/format.c +++ b/src/pulse/format.c @@ -218,8 +218,6 @@ pa_format_info* pa_format_info_from_sample_spec(pa_sample_spec *ss, pa_channel_m /* For PCM streams */ int pa_format_info_to_sample_spec(pa_format_info *f, pa_sample_spec *ss, pa_channel_map *map) { - int ret = -PA_ERR_INVALID; - pa_assert(f); pa_assert(ss); @@ -227,18 +225,15 @@ int pa_format_info_to_sample_spec(pa_format_info *f, pa_sample_spec *ss, pa_chan return pa_format_info_to_sample_spec_fake(f, ss, map); if (pa_format_info_get_sample_format(f, &ss->format) < 0) - goto out; + return -PA_ERR_INVALID; if (pa_format_info_get_rate(f, &ss->rate) < 0) - goto out; + return -PA_ERR_INVALID; if (pa_format_info_get_channels(f, &ss->channels) < 0) - goto out; + return -PA_ERR_INVALID; if (map && pa_format_info_get_channel_map(f, map) < 0) - goto out; - - ret = 0; + return -PA_ERR_INVALID; -out: - return ret; + return 0; } pa_prop_type_t pa_format_info_get_prop_type(pa_format_info *f, const char *key) { |