From 19138560f47319a66b12bdce4a4eae292f6e55a0 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 19 Nov 2022 13:19:26 +0800 Subject: [PATCH] Fix error: variable 'buflen' is uninitialized when used here Signed-off-by: Xiang Xiao --- net/sixlowpan/sixlowpan_icmpv6send.c | 2 +- net/sixlowpan/sixlowpan_tcpsend.c | 2 +- net/sixlowpan/sixlowpan_udpsend.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/sixlowpan/sixlowpan_icmpv6send.c b/net/sixlowpan/sixlowpan_icmpv6send.c index 0b3090814a..0e7448edcd 100644 --- a/net/sixlowpan/sixlowpan_icmpv6send.c +++ b/net/sixlowpan/sixlowpan_icmpv6send.c @@ -121,7 +121,7 @@ void sixlowpan_icmpv6_send(FAR struct net_driver_s *dev, if (hdrlen > dev->d_len) { nwarn("WARNING: Dropping small ICMPv6 packet: %u < %u\n", - buflen, hdrlen); + dev->d_len, hdrlen); } else { diff --git a/net/sixlowpan/sixlowpan_tcpsend.c b/net/sixlowpan/sixlowpan_tcpsend.c index f5b7416416..a127dd9743 100644 --- a/net/sixlowpan/sixlowpan_tcpsend.c +++ b/net/sixlowpan/sixlowpan_tcpsend.c @@ -907,7 +907,7 @@ void sixlowpan_tcp_send(FAR struct net_driver_s *dev, if (hdrlen > dev->d_len) { nwarn("WARNING: Dropping small TCP packet: %u < %u\n", - buflen, hdrlen); + dev->d_len, hdrlen); } else { diff --git a/net/sixlowpan/sixlowpan_udpsend.c b/net/sixlowpan/sixlowpan_udpsend.c index fd08b7b09b..d0a6d26ad9 100644 --- a/net/sixlowpan/sixlowpan_udpsend.c +++ b/net/sixlowpan/sixlowpan_udpsend.c @@ -459,7 +459,7 @@ void sixlowpan_udp_send(FAR struct net_driver_s *dev, if (hdrlen > dev->d_len) { nwarn("WARNING: Dropping small UDP packet: %u < %u\n", - buflen, hdrlen); + dev->d_len, hdrlen); } else {