summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKriish Sharma <kriish.sharma2006@gmail.com>2025-10-13 01:43:19 +0000
committerPaolo Abeni <pabeni@redhat.com>2025-10-14 12:40:49 +0200
commit3dacc900c00bad7275ee8c096dbcaab699d83e36 (patch)
tree5ce16cd243be60ce4c268a0997192b0cc885eae7 /include
parent18a7e218cfcdca6666e1f7356533e4c988780b57 (diff)
hdlc_ppp: fix potential null pointer in ppp_cp_event logging
drivers/net/wan/hdlc_ppp.c: In function ‘ppp_cp_event’: drivers/net/wan/hdlc_ppp.c:353:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 353 | netdev_info(dev, "%s down\n", proto_name(pid)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wan/hdlc_ppp.c:342:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 342 | netdev_info(dev, "%s up\n", proto_name(pid)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update proto_name() to return "LCP" by default instead of NULL. This change silences the compiler without changing existing behavior and removes the need for the local 'pname' variable in ppp_cp_event. Suggested-by: Krzysztof Hałasa <khalasa@piap.pl> Signed-off-by: Kriish Sharma <kriish.sharma2006@gmail.com> Acked-by: Krzysztof Hałasa <khalasa@piap.pl> Link: https://patch.msgid.link/20251013014319.1608706-1-kriish.sharma2006@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions