diff options
author | Kővágó, Zoltán <dirty.ice.hu@gmail.com> | 2019-08-19 01:06:58 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-08-21 09:13:37 +0200 |
commit | 7520462bc1eeda2f724ec84ff16338053b728920 (patch) | |
tree | 22e564a3c50a2672bbd50315d08265d923689284 /audio/audio_template.h | |
parent | 1d793fec6cc4b1a6234e70da36be8d6b00aa250b (diff) |
audio: use size_t where makes sense
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Message-id: c5193e687fc6cc0f60cb3e90fe69ddf2027d0df1.1566168923.git.DirtY.iCE.hu@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/audio_template.h')
-rw-r--r-- | audio/audio_template.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/audio/audio_template.h b/audio/audio_template.h index 54f07338e7..2562bf5f00 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -75,16 +75,16 @@ static void glue (audio_pcm_hw_free_resources_, TYPE) (HW *hw) HWBUF = NULL; } -static int glue (audio_pcm_hw_alloc_resources_, TYPE) (HW *hw) +static bool glue(audio_pcm_hw_alloc_resources_, TYPE)(HW *hw) { HWBUF = audio_calloc(__func__, hw->samples, sizeof(struct st_sample)); if (!HWBUF) { - dolog ("Could not allocate " NAME " buffer (%d samples)\n", - hw->samples); - return -1; + dolog("Could not allocate " NAME " buffer (%zu samples)\n", + hw->samples); + return false; } - return 0; + return true; } static void glue (audio_pcm_sw_free_resources_, TYPE) (SW *sw) @@ -265,7 +265,7 @@ static HW *glue(audio_pcm_hw_add_new_, TYPE)(AudioState *s, } if (audio_bug(__func__, hw->samples <= 0)) { - dolog ("hw->samples=%d\n", hw->samples); + dolog("hw->samples=%zd\n", hw->samples); goto err1; } @@ -279,7 +279,7 @@ static HW *glue(audio_pcm_hw_add_new_, TYPE)(AudioState *s, [hw->info.swap_endianness] [audio_bits_to_index (hw->info.bits)]; - if (glue (audio_pcm_hw_alloc_resources_, TYPE) (hw)) { + if (!glue(audio_pcm_hw_alloc_resources_, TYPE)(hw)) { goto err1; } |