1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

tcpdrop: use a better name of a variable.

No functional change intended.

Sponsored by:	Netflix, Inc.

(cherry picked from commit 300914a0ff)
This commit is contained in:
Michael Tuexen 2021-12-04 13:46:43 +01:00
parent c5f3adcce3
commit 61deed379f

View File

@ -68,11 +68,11 @@ main(int argc, char *argv[])
{ {
char stack[TCP_FUNCTION_NAME_LEN_MAX]; char stack[TCP_FUNCTION_NAME_LEN_MAX];
char *lport, *fport; char *lport, *fport;
bool dropall, dropallstack; bool dropall, dropspecific;
int ch, state; int ch, state;
dropall = false; dropall = false;
dropallstack = false; dropspecific = false;
stack[0] = '\0'; stack[0] = '\0';
state = -1; state = -1;
@ -85,11 +85,11 @@ main(int argc, char *argv[])
tcpdrop_list_commands = true; tcpdrop_list_commands = true;
break; break;
case 'S': case 'S':
dropallstack = true; dropspecific = true;
strlcpy(stack, optarg, sizeof(stack)); strlcpy(stack, optarg, sizeof(stack));
break; break;
case 's': case 's':
dropallstack = true; dropspecific = true;
for (state = 0; state < TCP_NSTATES; state++) { for (state = 0; state < TCP_NSTATES; state++) {
if (strcmp(tcpstates[state], optarg) == 0) if (strcmp(tcpstates[state], optarg) == 0)
break; break;
@ -106,9 +106,9 @@ main(int argc, char *argv[])
state == TCPS_CLOSED || state == TCPS_CLOSED ||
state == TCPS_LISTEN) state == TCPS_LISTEN)
usage(); usage();
if (dropall && dropallstack) if (dropall && dropspecific)
usage(); usage();
if (dropall || dropallstack) { if (dropall || dropspecific) {
if (argc != 0) if (argc != 0)
usage(); usage();
if (!tcpdropall(stack, state)) if (!tcpdropall(stack, state))