This cleanup patchset addresses several high and medium-impact Coverity defects.
Unit tests have been successfully executed via `make check` and they successfully passed. The list of revisions so far: v2: Fix some apply-robot checkpatch errors and warnings. v3: Fix some apply-robot checkpatch errors and warnings. v4: - Fix some apply-robot checkpatch errors and warnings. - Fix github-robot build failure: linux clang test asan. v5: Improve commit message to better describe the intent of this patch. v6: - Convert some explicit null pointer checks to assertions since they are checking for impossible conditions. - Use `nullable_memset()` and `nullable_memcpy()` instead of manually performing null checks for `memset()` and `memcpy()`. v7: - Split the single commit into a patch series which consists of 8 patches to make it easier to review and help keep things organized. - Incorporated feedback from Aaron Conole. James Raphael Tiovalen (8): lib: Add non-null assertions to return value of `dp_packet_data` lib, ovs-vsctl: Add zero-initializations shash, simap, smap: Return 0 if struct is NULL or hmap is empty ovsdb: Add more verbose logging in some null-pointer checks file, monitor: Add null pointer checks for old and new ovsdb_rows ovs-vsctl: Fix crash when routing is enabled lib, ovsdb: Add various null pointer checks treewide: Add `ovs_assert` to check for null pointers lib/dp-packet.c | 24 +++++++++++++++--------- lib/dpctl.c | 4 ++++ lib/latch-unix.c | 2 +- lib/netdev-native-tnl.c | 17 +++++++++++------ lib/odp-execute.c | 4 ++++ lib/pcap-file.c | 4 +++- lib/rtnetlink.c | 4 ++-- lib/sflow_agent.c | 3 +++ lib/sflow_api.h | 2 +- lib/shash.c | 19 ++++++++++++++----- lib/simap.c | 4 ++++ lib/smap.c | 4 ++++ lib/sset.c | 2 ++ ovsdb/condition.c | 10 +++++++++- ovsdb/file.c | 21 +++++++++++++++++---- ovsdb/jsonrpc-server.c | 6 +++++- ovsdb/monitor.c | 32 ++++++++++++++++++++++++++++---- ovsdb/ovsdb-client.c | 17 ++++++++++++++--- ovsdb/ovsdb-server.c | 2 ++ ovsdb/ovsdb-util.c | 9 +++++++++ ovsdb/ovsdb.c | 8 +++++++- ovsdb/query.c | 2 ++ ovsdb/row.c | 4 +++- ovsdb/table.c | 2 +- ovsdb/transaction.c | 2 ++ utilities/ovs-vsctl.c | 30 +++++++++++++++++++++--------- vtep/vtep-ctl.c | 5 ++++- 27 files changed, 192 insertions(+), 51 deletions(-) -- 2.40.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
