aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2014-10-04 17:21:30 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2014-10-04 17:21:30 +0000
commitd91c61c36406c79a0418cba366ff92e0585f1def (patch)
treeb81193fa894daca50c91c5811f29d892dc709c1d /sbin
parentd4e1b515782fb51b68e04e2243e6a6c83fe2d512 (diff)
downloadsrc-d91c61c36406c79a0418cba366ff92e0585f1def.tar.gz
src-d91c61c36406c79a0418cba366ff92e0585f1def.zip
Fix GCC wardnings.
Notes
Notes: svn path=/projects/ipfw/; revision=272530
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw2.c2
-rw-r--r--sbin/ipfw/tables.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 6045776a03be..ad2ae8bd90c3 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -3599,7 +3599,7 @@ chkarg:
errx(EX_USAGE, "missing argument for %s", *(av - 1));
if (isdigit(**av)) {
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",
*(av - 1));
} else if (_substrcmp(*av, "tablearg") == 0) {
diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c
index 3d5e1608e128..9e6d49a43e8e 100644
--- a/sbin/ipfw/tables.c
+++ b/sbin/ipfw/tables.c
@@ -38,7 +38,6 @@
#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[],
int add, int quiet, int update, int atomic);
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;
ipfw_table_value *v;
uint32_t i;
+ int dval;
char *comma, *e, *etype, *n, *p;
v = &tent->v.value;
@@ -1480,9 +1480,10 @@ tentry_fill_value(ipfw_obj_header *oh, ipfw_obj_tentry *tent, char *arg,
break;
case IPFW_VTYPE_DSCP:
if (isalpha(*n)) {
- if ((v->dscp = match_token(f_ipdscp, n)) != -1)
+ if ((dval = match_token(f_ipdscp, n)) != -1) {
+ v->dscp = dval;
break;
- else
+ } else
etype = "DSCP code";
} else {
v->dscp = strtol(n, &e, 10);