Fix build errors from last patch

This commit is contained in:
shemminger 2006-03-14 19:38:34 +00:00
parent 3925ad8119
commit 46b67dab26
1 changed files with 5 additions and 4 deletions

View File

@ -834,8 +834,9 @@ static int u32_parse_opt(struct filter_util *qu, char *handle, int argc, char **
} else if (matches(*argv, "divisor") == 0) { } else if (matches(*argv, "divisor") == 0) {
unsigned divisor; unsigned divisor;
NEXT_ARG(); NEXT_ARG();
if (get_unsigned(&divisor, *argv, 0) || divisor == 0 || if (get_unsigned(&divisor, *argv, 0) ||
divisor > 0x100 || (divisor - 1 & divisor)) { divisor == 0 ||
divisor > 0x100 || ((divisor - 1) & divisor)) {
fprintf(stderr, "Illegal \"divisor\"\n"); fprintf(stderr, "Illegal \"divisor\"\n");
return -1; return -1;
} }
@ -881,7 +882,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle, int argc, char **
struct tc_u32_sel sel; struct tc_u32_sel sel;
struct tc_u32_key keys[4]; struct tc_u32_key keys[4];
} sel2; } sel2;
memset(sel2, 0, sizeof(sel32)); memset(&sel2, 0, sizeof(sel2));
NEXT_ARG(); NEXT_ARG();
if (parse_selector(&argc, &argv, &sel2.sel, n)) { if (parse_selector(&argc, &argv, &sel2.sel, n)) {
fprintf(stderr, "Illegal \"sample\"\n"); fprintf(stderr, "Illegal \"sample\"\n");
@ -894,7 +895,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle, int argc, char **
if (*argv != 0 && strcmp(*argv, "divisor") == 0) { if (*argv != 0 && strcmp(*argv, "divisor") == 0) {
NEXT_ARG(); NEXT_ARG();
if (get_unsigned(&divisor, *argv, 0) || divisor == 0 || if (get_unsigned(&divisor, *argv, 0) || divisor == 0 ||
divisor > 0x100 || (divisor - 1 & divisor)) { divisor > 0x100 || ((divisor - 1) & divisor)) {
fprintf(stderr, "Illegal sample \"divisor\"\n"); fprintf(stderr, "Illegal sample \"divisor\"\n");
return -1; return -1;
} }