From 6c2fb7f07692ec8d9aad971b177dbb8718bf391a Mon Sep 17 00:00:00 2001 From: "[anp/hsw]" Date: Sat, 13 Mar 2021 20:22:05 +0700 Subject: Fix another errors found by cppcheck [accel-pppd/cli/tcp.c:305]: (error) Uninitialized variable: cln [accel-pppd/cli/telnet.c:642]: (error) Uninitialized variable: cln [accel-pppd/ctrl/l2tp/l2tp.c:4302]: (error) Uninitialized variable: msg_attr [accel-pppd/ctrl/l2tp/l2tp.c:4484]: (error) Uninitialized variable: msg_type [accel-pppd/ctrl/pppoe/disc.c:169]: (error) Uninitialized variable: n [accel-pppd/ctrl/pppoe/pppoe.c:1588]: (error) Uninitialized variable: pado --- accel-pppd/ctrl/l2tp/l2tp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'accel-pppd/ctrl/l2tp') diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 2467189..8567027 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -4224,7 +4224,7 @@ static int l2tp_tunnel_store_msg(struct l2tp_conn_t *conn, static int l2tp_tunnel_reply(struct l2tp_conn_t *conn, int need_ack) { - const struct l2tp_attr_t *msg_attr; + const struct l2tp_attr_t *msg_attr = NULL; struct l2tp_packet_t *pack; struct l2tp_sess_t *sess; uint16_t msg_sid; @@ -4430,7 +4430,7 @@ static int l2tp_udp_read(struct triton_md_handler_t *h) { struct l2tp_serv_t *serv = container_of(h, typeof(*serv), hnd); struct l2tp_packet_t *pack; - const struct l2tp_attr_t *msg_type; + const struct l2tp_attr_t *msg_type = NULL; struct in_pktinfo pkt_info; char src_addr[17]; -- cgit v1.2.3