many: final set of coccinelle check-pointer-deref tweaks (#41426)
This is a followup to https://github.com/systemd/systemd/pull/41400 with the final set of tweaks so that the new coccinelle `check-pinters-deref` checker runs without failures. It also includes a commit with some fixes for redundant asserts and the final commit to make the assert() in the inner loop of qsort POINTER_MAY_BE_NULL which will become a no-op - that is probably the most controversial one, I hope the commit message explains the trade-offs, I'm happy to drop it, I have no strong opinion either way. Please see the individual commits/commit messages for more details, most is (hopefully) relatively boring/mechanical.
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
#include "time-util.h"
|
||||
|
||||
static void cleanup_clear_loop_close(int *fd) {
|
||||
assert(fd);
|
||||
|
||||
if (*fd < 0)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user