From 450e25991246f3b46178a2b3be99cd4c8f493902 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 13 May 2024 12:23:50 -0400 Subject: [PATCH] android: Fix build error This fixes the following building error: android/hal-audio-sbc.c: In function 'sbc_codec_init': android/hal-audio-sbc.c:260:34: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 260 | sbc_data = calloc(sizeof(struct sbc_data), 1); | ^~~~~~ --- android/hal-audio-sbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/hal-audio-sbc.c b/android/hal-audio-sbc.c index 9c64d339c..6f7788aea 100644 --- a/android/hal-audio-sbc.c +++ b/android/hal-audio-sbc.c @@ -257,7 +257,7 @@ static bool sbc_codec_init(struct audio_preset *preset, uint16_t payload_len, return false; } - sbc_data = calloc(sizeof(struct sbc_data), 1); + sbc_data = calloc(1, sizeof(struct sbc_data)); if (!sbc_data) return false; -- 2.47.3