Fix GCC wardnings.
This commit is contained in:
parent
d4e1b51578
commit
d91c61c364
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/ipfw/; revision=272530
@ -3599,7 +3599,7 @@ compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate)
|
|||||||
errx(EX_USAGE, "missing argument for %s", *(av - 1));
|
errx(EX_USAGE, "missing argument for %s", *(av - 1));
|
||||||
if (isdigit(**av)) {
|
if (isdigit(**av)) {
|
||||||
action->arg1 = strtoul(*av, NULL, 10);
|
action->arg1 = strtoul(*av, NULL, 10);
|
||||||
if (action->arg1 <= 0 || action->arg1 >= IP_FW_TARG)
|
if (action->arg1 <= 0 || action->arg1 >= IP_FW_TABLEARG)
|
||||||
errx(EX_DATAERR, "illegal argument for %s",
|
errx(EX_DATAERR, "illegal argument for %s",
|
||||||
*(av - 1));
|
*(av - 1));
|
||||||
} else if (_substrcmp(*av, "tablearg") == 0) {
|
} else if (_substrcmp(*av, "tablearg") == 0) {
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
|
|
||||||
#include "ipfw2.h"
|
#include "ipfw2.h"
|
||||||
|
|
||||||
static void table_list(ipfw_xtable_info *i, int need_header);
|
|
||||||
static void table_modify_record(ipfw_obj_header *oh, int ac, char *av[],
|
static void table_modify_record(ipfw_obj_header *oh, int ac, char *av[],
|
||||||
int add, int quiet, int update, int atomic);
|
int add, int quiet, int update, int atomic);
|
||||||
static int table_flush(ipfw_obj_header *oh);
|
static int table_flush(ipfw_obj_header *oh);
|
||||||
@ -1386,6 +1385,7 @@ tentry_fill_value(ipfw_obj_header *oh, ipfw_obj_tentry *tent, char *arg,
|
|||||||
uint32_t a4, flag, val, vm;
|
uint32_t a4, flag, val, vm;
|
||||||
ipfw_table_value *v;
|
ipfw_table_value *v;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
int dval;
|
||||||
char *comma, *e, *etype, *n, *p;
|
char *comma, *e, *etype, *n, *p;
|
||||||
|
|
||||||
v = &tent->v.value;
|
v = &tent->v.value;
|
||||||
@ -1480,9 +1480,10 @@ tentry_fill_value(ipfw_obj_header *oh, ipfw_obj_tentry *tent, char *arg,
|
|||||||
break;
|
break;
|
||||||
case IPFW_VTYPE_DSCP:
|
case IPFW_VTYPE_DSCP:
|
||||||
if (isalpha(*n)) {
|
if (isalpha(*n)) {
|
||||||
if ((v->dscp = match_token(f_ipdscp, n)) != -1)
|
if ((dval = match_token(f_ipdscp, n)) != -1) {
|
||||||
|
v->dscp = dval;
|
||||||
break;
|
break;
|
||||||
else
|
} else
|
||||||
etype = "DSCP code";
|
etype = "DSCP code";
|
||||||
} else {
|
} else {
|
||||||
v->dscp = strtol(n, &e, 10);
|
v->dscp = strtol(n, &e, 10);
|
||||||
|
Loading…
Reference in New Issue
Block a user