Address some build issues introduced by api changes (#1505)

#1502 made APIs consistent with using bool as a return value where true
is success and false is failure
In a few places the change broke code

This PR fixes the breakage
This commit is contained in:
Pavel Punsky 2024-05-27 12:00:23 -07:00 committed by GitHub
parent 846f717059
commit 47fcc99853
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -929,7 +929,7 @@ static bool ur_string_map_init(ur_string_map *map) {
ur_string_map *ur_string_map_create(ur_string_map_func del_value_func) {
ur_string_map *map = (ur_string_map *)malloc(sizeof(ur_string_map));
if (ur_string_map_init(map) < 0) {
if (!ur_string_map_init(map)) {
free(map);
return NULL;
}

View File

@ -172,7 +172,7 @@ static bool rtcp_map_init(rtcp_map *map, ioa_engine_handle e) {
rtcp_map *rtcp_map_create(ioa_engine_handle e) {
rtcp_map *map = (rtcp_map *)calloc(sizeof(rtcp_map), 1);
if (rtcp_map_init(map, e) < 0) {
if (!rtcp_map_init(map, e)) {
free(map);
return NULL;
}

View File

@ -426,7 +426,7 @@ struct tsi_arg {
ioa_addr *addr;
};
static int turn_session_info_foreachcb(ur_map_key_type key, ur_map_value_type value, void *arg) {
static bool turn_session_info_foreachcb(ur_map_key_type key, ur_map_value_type value, void *arg) {
UNUSED_ARG(value);
int port = (int)key;
@ -437,7 +437,7 @@ static int turn_session_info_foreachcb(ur_map_key_type key, ur_map_value_type va
addr_set_port(&a, port);
turn_session_info_add_peer(ta->tsi, &a);
}
return 0;
return false;
}
int turn_session_info_copy_from(struct turn_session_info *tsi, ts_ur_super_session *ss) {