From 89573be718e680e9adbe9b2c4d4faae379986e73 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 24 Jul 2024 14:27:45 -0400 Subject: [PATCH] MT#55283 skip creation of single-item lists The function in charge of processing codec flags can already handle standalone string values and doesn't require a list to wrap single strings. Change-Id: Id9bc97d455c75a3d1b0a19c5dbe43f677c937401 --- daemon/control_ng_flags_parser.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/daemon/control_ng_flags_parser.c b/daemon/control_ng_flags_parser.c index dc4e6e216..64c90abcd 100644 --- a/daemon/control_ng_flags_parser.c +++ b/daemon/control_ng_flags_parser.c @@ -150,7 +150,6 @@ static bool parse_codec_to_dict(str * key, str * val, const char *cmp1, const ch enum call_opmode opmode) { str s; - bencode_item_t * dictp; if(!str_key_val_prefix(key, cmp1, val, &s)) { if(!cmp2) @@ -159,9 +158,7 @@ static bool parse_codec_to_dict(str * key, str * val, const char *cmp1, const ch return false; } - dictp = bencode_list(buf); - bencode_list_add_str(dictp, &s); - call_ng_codec_flags(out, &STR_INIT(dictstr), dictp, opmode); + call_ng_codec_flags(out, &STR_INIT(dictstr), bencode_str(buf, &s), opmode); return true; }