Whitespace/style changes merged from projects/ipfw.

This commit is contained in:
Alexander V. Chernikov 2014-08-23 17:57:06 +00:00
parent 912430f6f0
commit e86bb35d63
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270425
3 changed files with 14 additions and 10 deletions

View File

@ -592,7 +592,7 @@ match_token(struct _s_x *table, char *string)
for (pt = table ; i && pt->s != NULL ; pt++)
if (strlen(pt->s) == i && !bcmp(string, pt->s, i))
return pt->x;
return -1;
return (-1);
}
/**

View File

@ -351,10 +351,13 @@ tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd)
}
static int
iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg)
iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain,
uint32_t *tablearg)
{
if (ifp == NULL) /* no iface with this packet, match fails */
return 0;
return (0);
/* Check by name or by IP address */
if (cmd->name[0] != '\0') { /* match by name */
if (cmd->name[0] == '\1') /* use tablearg to match */
@ -2547,6 +2550,7 @@ sysctl_ipfw_table_num(SYSCTL_HANDLER_ARGS)
return (ipfw_resize_tables(&V_layer3_chain, ntables));
}
#endif
/*
* Module and VNET glue
*/
@ -2734,7 +2738,7 @@ vnet_ipfw_uninit(const void *unused)
ipfw_reap_rules(reap);
IPFW_LOCK_DESTROY(chain);
ipfw_dyn_uninit(1); /* free the remaining parts */
return 0;
return (0);
}
/*

View File

@ -759,14 +759,14 @@ check_ipfw_struct(struct ip_fw *rule, int size)
printf("ipfw: opcode %d, multiple actions"
" not allowed\n",
cmd->opcode);
return EINVAL;
return (EINVAL);
}
have_action = 1;
if (l != cmdlen) {
printf("ipfw: opcode %d, action must be"
" last opcode\n",
cmd->opcode);
return EINVAL;
return (EINVAL);
}
break;
#ifdef INET6
@ -809,25 +809,25 @@ check_ipfw_struct(struct ip_fw *rule, int size)
case O_IP6_DST_MASK:
case O_ICMP6TYPE:
printf("ipfw: no IPv6 support in kernel\n");
return EPROTONOSUPPORT;
return (EPROTONOSUPPORT);
#endif
default:
printf("ipfw: opcode %d, unknown opcode\n",
cmd->opcode);
return EINVAL;
return (EINVAL);
}
}
}
if (have_action == 0) {
printf("ipfw: missing action\n");
return EINVAL;
return (EINVAL);
}
return 0;
bad_size:
printf("ipfw: opcode %d size %d wrong\n",
cmd->opcode, cmdlen);
return EINVAL;
return (EINVAL);
}