mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 08:58:28 +02:00
platform: drop unnecessary check in _vlan_xgress_qos_mappings_cpy()
For one, "src_n_map" must always be greater than zero at this point. lgtm.com warns about that, and the point of this patch is to avoid that warning. Still, the check really isn't needed, also because nm_memdup() explicitly handles buffers sizes of zero.
This commit is contained in:
parent
90818b5391
commit
f903d3b7b8
1 changed files with 1 additions and 2 deletions
|
|
@ -540,8 +540,7 @@ _vlan_xgress_qos_mappings_cpy(guint * dst_n_map,
|
|||
|| _vlan_xgress_qos_mappings_cmp(src_n_map, *dst_map, src_map) != 0) {
|
||||
nm_clear_g_free(dst_map);
|
||||
*dst_n_map = src_n_map;
|
||||
if (src_n_map > 0)
|
||||
*dst_map = nm_memdup(src_map, sizeof(*src_map) * src_n_map);
|
||||
*dst_map = nm_memdup(src_map, sizeof(*src_map) * src_n_map);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue