diff options
author | markm <markm@FreeBSD.org> | 2003-05-11 18:17:00 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2003-05-11 18:17:00 +0000 |
commit | 141dcc06d33af21b6ab2f50416283892a6c6ed75 (patch) | |
tree | ab30b2d99d3bc7fb655df51c1bd008475a6a0535 /contrib/telnet | |
parent | 2d4780fd3a431ff83b576afcefb980fc85f5b8b4 (diff) | |
download | FreeBSD-src-141dcc06d33af21b6ab2f50416283892a6c6ed75.zip FreeBSD-src-141dcc06d33af21b6ab2f50416283892a6c6ed75.tar.gz |
Fix up external variables named "debug" that have a horrible habit
of conflicting with other, similarly named functions in static
libraries. This is done mostly by renaming the var if it is shared
amongst modules, or making it static otherwise.
OK'ed by: re(scottl)
Diffstat (limited to 'contrib/telnet')
-rw-r--r-- | contrib/telnet/telnet/commands.c | 8 | ||||
-rw-r--r-- | contrib/telnet/telnet/externs.h | 2 | ||||
-rw-r--r-- | contrib/telnet/telnet/main.c | 2 | ||||
-rw-r--r-- | contrib/telnet/telnet/telnet.c | 2 | ||||
-rw-r--r-- | contrib/telnet/telnetd/telnetd.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/contrib/telnet/telnet/commands.c b/contrib/telnet/telnet/commands.c index 3221699..32aca9f 100644 --- a/contrib/telnet/telnet/commands.c +++ b/contrib/telnet/telnet/commands.c @@ -532,11 +532,11 @@ togdebug(void) { #ifndef NOT43 if (net > 0 && - (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, debug)) < 0) { + (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, telnet_debug)) < 0) { perror("setsockopt (SO_DEBUG)"); } #else /* NOT43 */ - if (debug) { + if (telnet_debug) { if (net > 0 && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) perror("setsockopt (SO_DEBUG)"); } else @@ -741,7 +741,7 @@ static struct togglelist Togglelist[] = { { "debug", "debugging", (int (*)(int))togdebug, - &debug, + &telnet_debug, "turn on socket level debugging" }, { "netdata", "printing of hexadecimal network data (debugging)", @@ -2404,7 +2404,7 @@ tn(int argc, char *argv[]) } #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - if (debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { + if (telnet_debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { perror("setsockopt (SO_DEBUG)"); } diff --git a/contrib/telnet/telnet/externs.h b/contrib/telnet/telnet/externs.h index 5ecf114..e9be27e 100644 --- a/contrib/telnet/telnet/externs.h +++ b/contrib/telnet/telnet/externs.h @@ -127,7 +127,7 @@ extern int netdata, /* Print out network data flow */ prettydump, /* Print "netdata" output in user readable format */ termdata, /* Print out terminal data flow */ - debug, /* Debug level */ + telnet_debug, /* Debug level */ doaddrlookup, /* do a reverse lookup? */ clienteof; /* Client received EOF */ diff --git a/contrib/telnet/telnet/main.c b/contrib/telnet/telnet/main.c index de7e60c..e3fe643 100644 --- a/contrib/telnet/telnet/main.c +++ b/contrib/telnet/telnet/main.c @@ -213,7 +213,7 @@ main(int argc, char *argv[]) skiprc = 1; break; case 'd': - debug = 1; + telnet_debug = 1; break; case 'e': set_escape_char(optarg); diff --git a/contrib/telnet/telnet/telnet.c b/contrib/telnet/telnet/telnet.c index 2e29989..82ee464 100644 --- a/contrib/telnet/telnet/telnet.c +++ b/contrib/telnet/telnet/telnet.c @@ -95,7 +95,7 @@ int connected, showoptions, ISend, /* trying to send network data in */ - debug = 0, + telnet_debug = 0, crmod, netdata, /* Print out network data flow */ crlf, /* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */ diff --git a/contrib/telnet/telnetd/telnetd.c b/contrib/telnet/telnetd/telnetd.c index 6a5a623..bdb76d7 100644 --- a/contrib/telnet/telnetd/telnetd.c +++ b/contrib/telnet/telnetd/telnetd.c @@ -78,7 +78,7 @@ int terminaltypeok(char *); int hostinfo = 1; /* do we print login banner? */ -int debug = 0; +static int debug = 0; int keepalive = 1; const char *altlogin; |