afh: Minor simplification for afh_get_chunk().
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 20 Sep 2018 20:25:12 +0000 (22:25 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Dec 2018 13:40:42 +0000 (14:40 +0100)
The function already defines a shortcut for the pointer to the audio
format handler, so use it.

afh_common.c

index dcb0b85..cb773bd 100644 (file)
@@ -313,7 +313,7 @@ __must_check int afh_get_chunk(long unsigned chunk_num, struct afh_info *afhi,
                        if (ret < 0)
                                return ret;
                }
-               ret = afl[audio_format_id].get_chunk(chunk_num, *afh_context,
+               ret = afh->get_chunk(chunk_num, *afh_context,
                        buf, len);
                if (ret < 0) {
                        afh->close(*afh_context);