removed unused "unsuccess" global variable

This commit is contained in:
Sylvain Rochet 2012-06-09 16:00:22 +02:00
parent a7d7158b05
commit ce5121e659
4 changed files with 1 additions and 6 deletions

View File

@ -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 */

View File

@ -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

View File

@ -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 */

View File

@ -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];