Skip to content

batctl: Fixes and minor cleanup

Sven Eckelmann batman 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10batctl: Print dummy value when localtime failedtcpdump.c+5 -10 replies
2/10batctl: Handle failure during hash_iterator allocationhash.c+3 -00 replies
3/10batctl: Handle allocation error for path_buffsys.c+15 -00 replies
4/10batctl: Handle nlmsg_alloc errorsnetlink.c+15 -00 replies
5/10batctl: Handle nl_socket_alloc errorsnetlink.c+9 -00 replies
6/10batctl: Handle nl_cb_alloc errorsnetlink.c+16 -10 replies
7/10batctl: Free nl_sock on genl_ctrl_resolve errornetlink.c+11 -50 replies
8/10batctl: Free nl_sock when if_nametoindex failednetlink.c+4 -20 replies
9/10batctl: tcpdump: Fix types for for TT v1tcpdump.c+2 -10 replies
10/10batctl: Simplify concatenation of pathnamesbat-hosts.c functions.c+3 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [B.A.T.M.A.N.] [PATCH 00/10] batctl: Fixes and minor cleanup

From: Sven Eckelmann <[email protected]>

Hi,

today I had the unpleasent experience to receive [1] to a lot of PDF files which seem to contain some reports of the Klocwork static code analysis tool. Most of the stuff was nonsense about memory/resource leaks (even when it stored in some kind of structure one line before). I gathered the only interesting portions and prepared some patches for them.

The last two patches are actually not really bug fixes but are about code which completely killed the static analyzer. I didn't like the code in the last patch (looked to complex for something relatively easy) and thus I've just replaced it.

WARNING: these things were only compile tested

Kind regards,
Sven

[1] not unpleasent due to some issue reports. But going through several hundred false positives wasn't my goal for today. Someone at seems to get paid by false-positives which this Klocworks analyzer produces (and there are really some braindead ones - even clang's static analyzer looks like a genius against some of these reports)

Sven Eckelmann (10):
batctl: Print dummy value when localtime failed
batctl: Handle failure during hash_iterator allocation
batctl: Handle allocation error for path_buff
batctl: Handle nlmsg_alloc errors
batctl: Handle nl_socket_alloc errors
batctl: Handle nl_cb_alloc errors
batctl: Free nl_sock on genl_ctrl_resolve error
batctl: Free nl_sock when if_nametoindex failed
batctl: tcpdump: Fix types for for TT v1
batctl: Simplify concatenation of pathnames

 bat-hosts.c |  4 +---
 functions.c |  8 ++------
 hash.c      |  3 +++
 netlink.c   | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------
 sys.c       | 15 +++++++++++++++
 tcpdump.c   |  9 +++++++--
 6 files changed, 83 insertions(+), 19 deletions(-)
Signature · 1 line
2.11.0