diff options
author | David Tardon <dtardon@redhat.com> | 2022-08-09 14:35:15 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2022-09-13 08:13:27 +0200 |
commit | 995340074e554b4bf4a0fdb0cb7436692c5a4ffd (patch) | |
tree | ca3ee001db3e608ee80478f42fea9c3b409f1b7b /src/shared/netif-sriov.c | |
parent | Merge pull request #23087 from yuwata/udev-watch (diff) | |
download | systemd-995340074e554b4bf4a0fdb0cb7436692c5a4ffd.tar.xz systemd-995340074e554b4bf4a0fdb0cb7436692c5a4ffd.zip |
tree-wide: use ASSERT_PTR more
Diffstat (limited to 'src/shared/netif-sriov.c')
-rw-r--r-- | src/shared/netif-sriov.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/shared/netif-sriov.c b/src/shared/netif-sriov.c index 18e5f0eeb7..7559b0d00c 100644 --- a/src/shared/netif-sriov.c +++ b/src/shared/netif-sriov.c @@ -359,14 +359,13 @@ int config_parse_sr_iov_uint32( void *userdata) { _cleanup_(sr_iov_free_or_set_invalidp) SRIOV *sr_iov = NULL; - OrderedHashmap **sr_iov_by_section = data; + OrderedHashmap **sr_iov_by_section = ASSERT_PTR(data); uint32_t k; int r; assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = sr_iov_new_static(sr_iov_by_section, filename, section_line, &sr_iov); if (r < 0) @@ -427,13 +426,12 @@ int config_parse_sr_iov_vlan_proto( void *userdata) { _cleanup_(sr_iov_free_or_set_invalidp) SRIOV *sr_iov = NULL; - OrderedHashmap **sr_iov_by_section = data; + OrderedHashmap **sr_iov_by_section = ASSERT_PTR(data); int r; assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = sr_iov_new_static(sr_iov_by_section, filename, section_line, &sr_iov); if (r < 0) @@ -466,13 +464,12 @@ int config_parse_sr_iov_link_state( void *userdata) { _cleanup_(sr_iov_free_or_set_invalidp) SRIOV *sr_iov = NULL; - OrderedHashmap **sr_iov_by_section = data; + OrderedHashmap **sr_iov_by_section = ASSERT_PTR(data); int r; assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = sr_iov_new_static(sr_iov_by_section, filename, section_line, &sr_iov); if (r < 0) @@ -518,13 +515,12 @@ int config_parse_sr_iov_boolean( void *userdata) { _cleanup_(sr_iov_free_or_set_invalidp) SRIOV *sr_iov = NULL; - OrderedHashmap **sr_iov_by_section = data; + OrderedHashmap **sr_iov_by_section = ASSERT_PTR(data); int r; assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = sr_iov_new_static(sr_iov_by_section, filename, section_line, &sr_iov); if (r < 0) @@ -576,13 +572,12 @@ int config_parse_sr_iov_mac( void *userdata) { _cleanup_(sr_iov_free_or_set_invalidp) SRIOV *sr_iov = NULL; - OrderedHashmap **sr_iov_by_section = data; + OrderedHashmap **sr_iov_by_section = ASSERT_PTR(data); int r; assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = sr_iov_new_static(sr_iov_by_section, filename, section_line, &sr_iov); if (r < 0) @@ -617,13 +612,12 @@ int config_parse_sr_iov_num_vfs( void *data, void *userdata) { - uint32_t n, *num_vfs = data; + uint32_t n, *num_vfs = ASSERT_PTR(data); int r; assert(filename); assert(lvalue); assert(rvalue); - assert(data); if (isempty(rvalue)) { *num_vfs = UINT32_MAX; |