Patrick McHardy wrote:
Thomas Graf wrote:
+int
+tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
+ struct rtattr *rate_tlv, struct tcf_exts *exts,
+ struct tcf_ext_map *map)
+{
+ memset(exts, 0, sizeof(*exts));
+
+#ifdef CONFIG_NET_CLS_ACT
+ int err;
+ struct tc_action *act;
+
+ if (map->police && tb[map->police-1] && rate_tlv) {
+ act = tcf_action_init_1(tb[map->police-1], rate_tlv, "police",
+ TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
+ if (NULL == act)
Please use act == NULL
Agreed, but I understand the people who like this (ugly) style, it becomes
less likely to become an "if (act = NULL)", but hey, compilers already
helps us with a nice warning.
- Arnaldo
|