Kill EOL whitespaces, style(9) fix.
This commit is contained in:
parent
d6abaeebeb
commit
a54587ad70
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106505
@ -445,7 +445,7 @@ strtoport(char *s, char **end, int base, int proto)
|
|||||||
*end = s; /* default - not found */
|
*end = s; /* default - not found */
|
||||||
if ( *s == '\0')
|
if ( *s == '\0')
|
||||||
return 0; /* not found */
|
return 0; /* not found */
|
||||||
|
|
||||||
if (isdigit(*s))
|
if (isdigit(*s))
|
||||||
return strtol(s, end, base);
|
return strtol(s, end, base);
|
||||||
|
|
||||||
@ -1026,7 +1026,7 @@ show_ipfw(struct ip_fw *rule)
|
|||||||
}
|
}
|
||||||
flags |= HAVE_PROTO;
|
flags |= HAVE_PROTO;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /*options ... */
|
default: /*options ... */
|
||||||
show_prerequisites(&flags, HAVE_IP | HAVE_OPTIONS, 0);
|
show_prerequisites(&flags, HAVE_IP | HAVE_OPTIONS, 0);
|
||||||
if ((cmd->len & F_OR) && !or_block)
|
if ((cmd->len & F_OR) && !or_block)
|
||||||
@ -1158,7 +1158,7 @@ show_ipfw(struct ip_fw *rule)
|
|||||||
char *comma = " ";
|
char *comma = " ";
|
||||||
|
|
||||||
printf(" limit");
|
printf(" limit");
|
||||||
for ( ; p->x != 0 ; p++)
|
for ( ; p->x != 0 ; p++)
|
||||||
if ((x & p->x) == p->x) {
|
if ((x & p->x) == p->x) {
|
||||||
x &= ~p->x;
|
x &= ~p->x;
|
||||||
printf("%s%s", comma, p->s);
|
printf("%s%s", comma, p->s);
|
||||||
@ -1207,7 +1207,7 @@ show_dyn_ipfw(ipfw_dyn_rule *d)
|
|||||||
printf(" LIMIT");
|
printf(" LIMIT");
|
||||||
break;
|
break;
|
||||||
case O_KEEP_STATE: /* bidir, no mask */
|
case O_KEEP_STATE: /* bidir, no mask */
|
||||||
printf(" STATE");
|
printf(" STATE");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1383,7 +1383,7 @@ list_pipes(void *data, int nbytes, int ac, char *av[])
|
|||||||
print_flowset_parms(&(p->fs), prefix);
|
print_flowset_parms(&(p->fs), prefix);
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf(" V %20qd\n", p->V >> MY_M);
|
printf(" V %20qd\n", p->V >> MY_M);
|
||||||
|
|
||||||
q = (struct dn_flow_queue *)(p+1);
|
q = (struct dn_flow_queue *)(p+1);
|
||||||
list_queues(&(p->fs), q);
|
list_queues(&(p->fs), q);
|
||||||
}
|
}
|
||||||
@ -1655,7 +1655,7 @@ show_usage(void)
|
|||||||
static void
|
static void
|
||||||
help(void)
|
help(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
fprintf(stderr, "ipfw syntax summary:\n"
|
fprintf(stderr, "ipfw syntax summary:\n"
|
||||||
"ipfw add [N] [prob {0..1}] ACTION [log [logamount N]] ADDR OPTIONS\n"
|
"ipfw add [N] [prob {0..1}] ACTION [log [logamount N]] ADDR OPTIONS\n"
|
||||||
"ipfw {pipe|queue} N config BODY\n"
|
"ipfw {pipe|queue} N config BODY\n"
|
||||||
@ -2049,7 +2049,7 @@ config_pipe(int ac, char **av)
|
|||||||
if (*av[0] == '/') {
|
if (*av[0] == '/') {
|
||||||
a = strtoul(av[0]+1, &end, 0);
|
a = strtoul(av[0]+1, &end, 0);
|
||||||
a = (a == 32) ? ~0 : (1 << a) - 1;
|
a = (a == 32) ? ~0 : (1 << a) - 1;
|
||||||
} else
|
} else
|
||||||
a = strtoul(av[0], &end, 0);
|
a = strtoul(av[0], &end, 0);
|
||||||
if (p32 != NULL)
|
if (p32 != NULL)
|
||||||
*p32 = a;
|
*p32 = a;
|
||||||
@ -2108,7 +2108,7 @@ config_pipe(int ac, char **av)
|
|||||||
case TOK_DROPTAIL:
|
case TOK_DROPTAIL:
|
||||||
pipe.fs.flags_fs &= ~(DN_IS_RED|DN_IS_GENTLE_RED);
|
pipe.fs.flags_fs &= ~(DN_IS_RED|DN_IS_GENTLE_RED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOK_BW:
|
case TOK_BW:
|
||||||
NEED1("bw needs bandwidth or interface\n");
|
NEED1("bw needs bandwidth or interface\n");
|
||||||
if (do_pipe != 1)
|
if (do_pipe != 1)
|
||||||
@ -2423,7 +2423,7 @@ add_ports(ipfw_insn *cmd, char *av, u_char proto, int opcode)
|
|||||||
* In the assembled microcode, the first opcode must be a O_PROBE_STATE
|
* In the assembled microcode, the first opcode must be a O_PROBE_STATE
|
||||||
* (generated if the rule includes a keep-state option), then the
|
* (generated if the rule includes a keep-state option), then the
|
||||||
* various match patterns, the "log" action, and the actual action.
|
* various match patterns, the "log" action, and the actual action.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
add(int ac, char *av[])
|
add(int ac, char *av[])
|
||||||
@ -2655,7 +2655,7 @@ add(int ac, char *av[])
|
|||||||
} else \
|
} else \
|
||||||
errx(EX_USAGE, "missing \")\"\n"); \
|
errx(EX_USAGE, "missing \")\"\n"); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NOT_BLOCK \
|
#define NOT_BLOCK \
|
||||||
if (ac && !strncmp(*av, "not", strlen(*av))) { \
|
if (ac && !strncmp(*av, "not", strlen(*av))) { \
|
||||||
if (cmd->len & F_NOT) \
|
if (cmd->len & F_NOT) \
|
||||||
@ -2953,7 +2953,6 @@ add(int ac, char *av[])
|
|||||||
grp = (*end == '\0') ? getgrgid(gid) : getgrnam(*av);
|
grp = (*end == '\0') ? getgrgid(gid) : getgrnam(*av);
|
||||||
if (grp == NULL)
|
if (grp == NULL)
|
||||||
errx(EX_DATAERR, "gid \"%s\" nonexistent", *av);
|
errx(EX_DATAERR, "gid \"%s\" nonexistent", *av);
|
||||||
|
|
||||||
cmd32->d[0] = grp->gr_gid;
|
cmd32->d[0] = grp->gr_gid;
|
||||||
cmd->len = F_INSN_SIZE(ipfw_insn_u32);
|
cmd->len = F_INSN_SIZE(ipfw_insn_u32);
|
||||||
ac--; av++;
|
ac--; av++;
|
||||||
@ -3051,7 +3050,7 @@ add(int ac, char *av[])
|
|||||||
} else
|
} else
|
||||||
errx(EX_DATAERR, "invalid protocol ``%s''", av);
|
errx(EX_DATAERR, "invalid protocol ``%s''", av);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOK_SRCIP:
|
case TOK_SRCIP:
|
||||||
NEED1("missing source IP");
|
NEED1("missing source IP");
|
||||||
if (add_srcip(cmd, *av)) {
|
if (add_srcip(cmd, *av)) {
|
||||||
@ -3398,7 +3397,7 @@ ipfw_main(int ac, char **av)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ipfw_readfile(int ac, char *av[])
|
ipfw_readfile(int ac, char *av[])
|
||||||
{
|
{
|
||||||
#define MAX_ARGS 32
|
#define MAX_ARGS 32
|
||||||
#define WHITESP " \t\f\v\n\r"
|
#define WHITESP " \t\f\v\n\r"
|
||||||
|
Loading…
Reference in New Issue
Block a user