summaryrefslogtreecommitdiffstats
path: root/libxtables/xtables.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxtables/xtables.c')
-rw-r--r--libxtables/xtables.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libxtables/xtables.c b/libxtables/xtables.c
index 891d81a7..57a11022 100644
--- a/libxtables/xtables.c
+++ b/libxtables/xtables.c
@@ -538,15 +538,15 @@ void xtables_parse_interface(const char *arg, char *vianame,
} else {
/* Include nul-terminator in match */
memset(mask, 0xFF, vialen + 1);
- for (i = 0; vianame[i]; i++) {
- if (vianame[i] == '/' ||
- vianame[i] == ' ') {
- fprintf(stderr,
- "Warning: weird character in interface"
- " `%s' ('/' and ' ' are not allowed by the kernel).\n",
- vianame);
- break;
- }
+ }
+
+ /* Display warning on invalid characters */
+ for (i = 0; vianame[i]; i++) {
+ if (vianame[i] == '/' || vianame[i] == ' ') {
+ fprintf(stderr, "Warning: weird character in interface"
+ " `%s' ('/' and ' ' are not allowed by the kernel).\n",
+ vianame);
+ break;
}
}
}