3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

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
This commit is contained in:
Denis Kenzior 2021-02-08 15:35:32 -06:00
parent 9885568b47
commit 897ef661fe

View File

@ -1688,8 +1688,7 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus *dbus,
goto invalid; goto invalid;
} }
new_msg = l_genl_msg_new_sized(HWSIM_CMD_NEW_RADIO, new_msg = l_genl_msg_new(HWSIM_CMD_NEW_RADIO);
16 + name ? strlen(name) : 0);
l_genl_msg_append_attr(new_msg, HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE, l_genl_msg_append_attr(new_msg, HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE,
0, NULL); 0, NULL);