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:
parent
4d7c8790d7
commit
f4ee15e939
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue