Bluetooth samples: unicast audio client: Fix build warnings

In 85bb2624bc
init_lc3()'s prototype was changed to return an int,
but the code was not updated to return something !=0
on all errors, or 0 on error.

Fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-10-30 13:18:43 +01:00 committed by Carles Cufí
commit f4ee15e939

View file

@ -245,17 +245,17 @@ static int init_lc3(void)
if (freq_hz < 0) {
printk("Error: Codec frequency not set, cannot start codec.");
return;
return -1;
}
if (frame_duration_us < 0) {
printk("Error: Frame duration not set, cannot start codec.");
return;
return -1;
}
if (octets_per_frame < 0) {
printk("Error: Octets per frame not set, cannot start codec.");
return;
return -1;
}
frame_duration_100us = frame_duration_us / 100;
@ -277,7 +277,9 @@ static int init_lc3(void)
if (lc3_encoder == NULL) {
printk("ERROR: Failed to setup LC3 encoder - wrong parameters?\n");
return -1;
}
return 0;
}
#else