diff options
author | Max Kellermann <max@duempel.org> | 2009-07-22 19:04:38 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-07-22 19:04:38 +0200 |
commit | 172a1dbdb9719cd71835d639f15fcac95e549915 (patch) | |
tree | 497b2ec1b7bf6d050f407d2edeedcf797f2b4c4b /src/pcm_convert.c | |
parent | c5a662f405a28caca2380d1b20fed050b1407ad5 (diff) | |
download | mpd-172a1dbdb9719cd71835d639f15fcac95e549915.tar.gz mpd-172a1dbdb9719cd71835d639f15fcac95e549915.tar.xz mpd-172a1dbdb9719cd71835d639f15fcac95e549915.zip |
pcm_byteswap: converted NULL checks to assertions
It is illegal to pass a NULL buffer to pcm_byteswap_X(). The result
of this is that pcm_byteswap_X() never returns NULL.
Diffstat (limited to 'src/pcm_convert.c')
-rw-r--r-- | src/pcm_convert.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/pcm_convert.c b/src/pcm_convert.c index 94c72a941..8a35d807e 100644 --- a/src/pcm_convert.c +++ b/src/pcm_convert.c @@ -88,8 +88,7 @@ pcm_convert_16(struct pcm_convert_state *state, if (dest_format->reverse_endian) { buf = pcm_byteswap_16(&state->byteswap_buffer, buf, len); - if (!buf) - g_error("pcm_byteswap_16() failed"); + assert(buf != NULL); } *dest_size_r = len; @@ -131,8 +130,7 @@ pcm_convert_24(struct pcm_convert_state *state, if (dest_format->reverse_endian) { buf = pcm_byteswap_32(&state->byteswap_buffer, buf, len); - if (!buf) - g_error("pcm_byteswap_32() failed"); + assert(buf != NULL); } *dest_size_r = len; @@ -174,8 +172,7 @@ pcm_convert_32(struct pcm_convert_state *state, if (dest_format->reverse_endian) { buf = pcm_byteswap_32(&state->byteswap_buffer, buf, len); - if (!buf) - g_error("pcm_byteswap_32() failed"); + assert(buf != NULL); } *dest_size_r = len; |