git: 6454d0c8cb5c - main - libalias: Remove unused variables.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 Apr 2022 23:46:28 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6454d0c8cb5ca1771fa0826998764687add3d1f7 commit 6454d0c8cb5ca1771fa0826998764687add3d1f7 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-06 23:45:29 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-06 23:45:29 +0000 libalias: Remove unused variables. --- sys/netinet/libalias/alias.c | 11 +++++------ sys/netinet/libalias/alias_sctp.c | 6 ------ sys/netinet/libalias/alias_skinny.c | 2 -- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c index 37f5bd5a1db1..8a7760f93b6e 100644 --- a/sys/netinet/libalias/alias.c +++ b/sys/netinet/libalias/alias.c @@ -843,7 +843,6 @@ UdpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create) u_short dest_port; u_short proxy_server_port; int proxy_type; - int error; LIBALIAS_LOCK_ASSERT(la); @@ -910,7 +909,7 @@ UdpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create) alias_port = GetAliasPort(lnk); /* Walk out chain. */ - error = find_handler(OUT, UDP, la, pip, &ad); + find_handler(OUT, UDP, la, pip, &ad); /* If UDP checksum is not zero, adjust since source port is */ /* being aliased and source address is being altered */ @@ -960,7 +959,7 @@ TcpAliasIn(struct libalias *la, struct ip *pip) struct in_addr proxy_address; u_short alias_port; u_short proxy_port; - int accumulate, error; + int accumulate; /* * The init of MANY vars is a bit below, but aliashandlepptpin @@ -979,7 +978,7 @@ TcpAliasIn(struct libalias *la, struct ip *pip) }; /* Walk out chain. */ - error = find_handler(IN, TCP, la, pip, &ad); + find_handler(IN, TCP, la, pip, &ad); alias_address = GetAliasAddress(lnk); original_address = GetOriginalAddress(lnk); @@ -1066,7 +1065,7 @@ TcpAliasIn(struct libalias *la, struct ip *pip) static int TcpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create) { - int proxy_type, error; + int proxy_type; u_short dest_port; u_short proxy_server_port; size_t dlen; @@ -1148,7 +1147,7 @@ TcpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create) TcpMonitorOut(tc->th_flags, lnk); /* Walk out chain. */ - error = find_handler(OUT, TCP, la, pip, &ad); + find_handler(OUT, TCP, la, pip, &ad); /* Adjust TCP checksum since source port is being aliased * and source address is being altered */ diff --git a/sys/netinet/libalias/alias_sctp.c b/sys/netinet/libalias/alias_sctp.c index b88ad2b28ca8..8dc432ef6307 100644 --- a/sys/netinet/libalias/alias_sctp.c +++ b/sys/netinet/libalias/alias_sctp.c @@ -1504,16 +1504,10 @@ RmGlobalIPAddresses(struct sctp_nat_msg *sm, struct sctp_nat_assoc *assoc, int d struct sctp_asconf_addrv4_param *asconf_ipv4_param; struct sctp_paramhdr *param; struct sctp_GlobalAddress *G_Addr, *G_Addr_tmp; - struct in_addr g_addr; int bytes_left; int param_size; int param_count; - if (direction == SN_TO_GLOBAL) - g_addr = sm->ip_hdr->ip_dst; - else - g_addr = sm->ip_hdr->ip_src; - bytes_left = sm->chunk_length; param_count = 1; param = sm->sctpchnk.Asconf; diff --git a/sys/netinet/libalias/alias_skinny.c b/sys/netinet/libalias/alias_skinny.c index 31b33696fc20..8c933ba74b4a 100644 --- a/sys/netinet/libalias/alias_skinny.c +++ b/sys/netinet/libalias/alias_skinny.c @@ -274,13 +274,11 @@ alias_skinny_opnrcvch_ack(struct libalias *la, struct OpenReceiveChannelAck *opn { struct in_addr null_addr; struct alias_link *opnrcv_lnk; - u_int32_t localPort; (void)lnk; (void)direction; *localIpAddr = (u_int32_t)opnrcvch_ack->ipAddr; - localPort = opnrcvch_ack->port; null_addr.s_addr = INADDR_ANY; opnrcv_lnk = FindUdpTcpOut(la, pip->ip_src, null_addr,