Skip to content

Commit ee47484

Browse files
Phil Suttershemminger
authored andcommitted
tc: flower: No need to cache indev arg
Since addattrstrz() will copy the provided string into the attribute payload, there is no need to cache the data. Signed-off-by: Phil Sutter <phil@nwl.cc>
1 parent 26111ab commit ee47484

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tc/f_flower.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,11 +629,8 @@ static int flower_parse_opt(struct filter_util *qu, char *handle,
629629
} else if (matches(*argv, "skip_sw") == 0) {
630630
flags |= TCA_CLS_FLAGS_SKIP_SW;
631631
} else if (matches(*argv, "indev") == 0) {
632-
char ifname[IFNAMSIZ] = {};
633-
634632
NEXT_ARG();
635-
strncpy(ifname, *argv, sizeof(ifname) - 1);
636-
addattrstrz(n, MAX_MSG, TCA_FLOWER_INDEV, ifname);
633+
addattrstrz(n, MAX_MSG, TCA_FLOWER_INDEV, *argv);
637634
} else if (matches(*argv, "vlan_id") == 0) {
638635
__u16 vid;
639636

0 commit comments

Comments
 (0)