From ce5121e659ab397ed7b6c37f32b5f2fd929b1b04 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 9 Jun 2012 16:00:22 +0200 Subject: [PATCH] removed unused "unsuccess" global variable --- src/netif/ppp/auth.c | 1 - src/netif/ppp/ppp.c | 2 -- src/netif/ppp/ppp_impl.h | 1 - src/netif/ppp/utils.c | 3 +-- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/netif/ppp/auth.c b/src/netif/ppp/auth.c index 7273859a..cfd23b19 100644 --- a/src/netif/ppp/auth.c +++ b/src/netif/ppp/auth.c @@ -1207,7 +1207,6 @@ np_up(unit, proto) * At this point we consider that the link has come up successfully. */ status = EXIT_OK; - unsuccess = 0; new_phase(unit, PHASE_RUNNING); #if 0 /* UNUSED */ diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index bb7a28f0..65ae4eb7 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -150,7 +150,6 @@ */ /* FIXME: global variables per PPP session */ /* FIXME: clean global variables */ -int unsuccess; /* # unsuccessful connection attempts */ int listen_time; /* time to listen first (ms) */ int status; /* exit status for pppd */ @@ -295,7 +294,6 @@ int ppp_init(void) { int i; struct protent *protp; - unsuccess = 0; listen_time = 0; status = EXIT_OK; #if PPP_STATS_SUPPORT diff --git a/src/netif/ppp/ppp_impl.h b/src/netif/ppp/ppp_impl.h index f2711e3e..0cfab303 100644 --- a/src/netif/ppp/ppp_impl.h +++ b/src/netif/ppp/ppp_impl.h @@ -255,7 +255,6 @@ struct epdisc { /* * Global variables. */ -extern int unsuccess; /* # unsuccessful connection attempts */ extern int listen_time; /* time to listen first (ms) */ extern int status; /* exit status for pppd */ extern int need_holdoff; /* Need holdoff period after link terminates */ diff --git a/src/netif/ppp/utils.c b/src/netif/ppp/utils.c index bc49d886..c0eee4be 100644 --- a/src/netif/ppp/utils.c +++ b/src/netif/ppp/utils.c @@ -776,8 +776,7 @@ dump_packet(const char *tag, unsigned char *p, int len) /* * don't print LCP echo request/reply packets if the link is up. */ - if (unsuccess == 0 && proto == PPP_LCP - && len >= 2 + HEADERLEN) { + if (proto == PPP_LCP && len >= 2 + HEADERLEN) { unsigned char *lcp = p + 2; int l = (lcp[2] << 8) + lcp[3];