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/cli/tcp.c | 2 +- accel-pppd/cli/telnet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'accel-pppd/cli') diff --git a/accel-pppd/cli/tcp.c b/accel-pppd/cli/tcp.c index 270d8cb..87633cb 100644 --- a/accel-pppd/cli/tcp.c +++ b/accel-pppd/cli/tcp.c @@ -298,7 +298,7 @@ static int serv_read(struct triton_md_handler_t *h) static void serv_close(struct triton_context_t *ctx) { - struct tcp_client_t *cln; + struct tcp_client_t *cln = NULL; while (!list_empty(&clients)) { cln = list_entry(clients.next, typeof(*cln), entry); diff --git a/accel-pppd/cli/telnet.c b/accel-pppd/cli/telnet.c index 4b5f63b..4ea1839 100644 --- a/accel-pppd/cli/telnet.c +++ b/accel-pppd/cli/telnet.c @@ -635,7 +635,7 @@ static int serv_read(struct triton_md_handler_t *h) } static void serv_close(struct triton_context_t *ctx) { - struct telnet_client_t *cln; + struct telnet_client_t *cln = NULL; while (!list_empty(&clients)) { cln = list_entry(clients.next, typeof(*cln), entry); -- cgit v1.2.3