diff options
author | des <des@FreeBSD.org> | 2004-07-05 11:10:57 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-07-05 11:10:57 +0000 |
commit | 75b8ca22865b39326d190287e3fba668f2bc9c69 (patch) | |
tree | 77fa5223deb526198fa337db00a3d819bbd0caf9 /sys/netinet/libalias/alias_ftp.c | |
parent | 831b8f89dbfee234b02272af07d46aa93a33579c (diff) | |
download | FreeBSD-src-75b8ca22865b39326d190287e3fba668f2bc9c69.zip FreeBSD-src-75b8ca22865b39326d190287e3fba668f2bc9c69.tar.gz |
Make libalias WARNS?=6-clean. This mostly involves renaming variables
named link, foo_link or link_foo to lnk, foo_lnk or lnk_foo, fixing
signed / unsigned comparisons, and shoving unused function arguments
under the carpet.
I was hoping WARNS?=6 might reveal more serious problems, and perhaps
the source of the -O2 breakage, but found no smoking gun.
Diffstat (limited to 'sys/netinet/libalias/alias_ftp.c')
-rw-r--r-- | sys/netinet/libalias/alias_ftp.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/netinet/libalias/alias_ftp.c b/sys/netinet/libalias/alias_ftp.c index 2b678c6..79938db 100644 --- a/sys/netinet/libalias/alias_ftp.c +++ b/sys/netinet/libalias/alias_ftp.c @@ -104,7 +104,7 @@ void AliasHandleFtpOut( struct libalias *la, struct ip *pip, /* IP packet to examine/patch */ - struct alias_link *link, /* The link to go through (aliased port) */ + struct alias_link *lnk, /* The link to go through (aliased port) */ int maxpacketsize /* The maximum size this packet can grow to (including headers) */ ) { @@ -127,7 +127,7 @@ AliasHandleFtpOut( * Check that data length is not too long and previous message was * properly terminated with CRLF. */ - pflags = GetProtocolFlags(link); + pflags = GetProtocolFlags(lnk); if (dlen <= MAX_MESSAGE_SIZE && !(pflags & WAIT_CRLF)) { ftp_message_type = FTP_UNKNOWN_MESSAGE; @@ -152,7 +152,7 @@ AliasHandleFtpOut( } if (ftp_message_type != FTP_UNKNOWN_MESSAGE) - NewFtpMessage(la, pip, link, maxpacketsize, ftp_message_type); + NewFtpMessage(la, pip, lnk, maxpacketsize, ftp_message_type); } /* Track the msgs which are CRLF term'd for PORT/PASV FW breach */ @@ -164,7 +164,7 @@ AliasHandleFtpOut( pflags &= ~WAIT_CRLF; else pflags |= WAIT_CRLF; - SetProtocolFlags(link, pflags); + SetProtocolFlags(lnk, pflags); } } @@ -551,11 +551,11 @@ ParseFtp229Reply(struct libalias *la, char *sptr, int dlen) static void NewFtpMessage(struct libalias *la, struct ip *pip, - struct alias_link *link, + struct alias_link *lnk, int maxpacketsize, int ftp_message_type) { - struct alias_link *ftp_link; + struct alias_link *ftp_lnk; /* Security checks. */ if (pip->ip_src.s_addr != la->true_addr.s_addr) @@ -565,16 +565,16 @@ NewFtpMessage(struct libalias *la, struct ip *pip, return; /* Establish link to address and port found in FTP control message. */ - ftp_link = FindUdpTcpOut(la, la->true_addr, GetDestAddress(link), + ftp_lnk = FindUdpTcpOut(la, la->true_addr, GetDestAddress(lnk), htons(la->true_port), 0, IPPROTO_TCP, 1); - if (ftp_link != NULL) { + if (ftp_lnk != NULL) { int slen, hlen, tlen, dlen; struct tcphdr *tc; #ifndef NO_FW_PUNCH /* Punch hole in firewall */ - PunchFWHole(ftp_link); + PunchFWHole(ftp_lnk); #endif /* Calculate data length of TCP packet */ @@ -593,14 +593,14 @@ NewFtpMessage(struct libalias *la, struct ip *pip, struct in_addr alias_address; /* Decompose alias address into quad format */ - alias_address = GetAliasAddress(link); + alias_address = GetAliasAddress(lnk); ptr = (u_char *) & alias_address.s_addr; a1 = *ptr++; a2 = *ptr++; a3 = *ptr++; a4 = *ptr; - alias_port = GetAliasPort(ftp_link); + alias_port = GetAliasPort(ftp_lnk); switch (ftp_message_type) { case FTP_PORT_COMMAND: @@ -646,9 +646,9 @@ NewFtpMessage(struct libalias *la, struct ip *pip, { int delta; - SetAckModified(link); - delta = GetDeltaSeqOut(pip, link); - AddSeq(pip, link, delta + slen - dlen); + SetAckModified(lnk); + delta = GetDeltaSeqOut(pip, lnk); + AddSeq(pip, lnk, delta + slen - dlen); } /* Revise IP header */ |