From 897ef661febff43dea13ee5e8127431e0cebc912 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 8 Feb 2021 15:35:32 -0600 Subject: [PATCH] hwsim: Don't use l_genl_msg_new_sized with a conditional l_genl API will now automatically grow message buffers as needed, so there's no need to make the logic over-complicated --- tools/hwsim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/hwsim.c b/tools/hwsim.c index 62a7d66d..08198b56 100644 --- a/tools/hwsim.c +++ b/tools/hwsim.c @@ -1688,8 +1688,7 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus *dbus, goto invalid; } - new_msg = l_genl_msg_new_sized(HWSIM_CMD_NEW_RADIO, - 16 + name ? strlen(name) : 0); + new_msg = l_genl_msg_new(HWSIM_CMD_NEW_RADIO); l_genl_msg_append_attr(new_msg, HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE, 0, NULL);