On 18/06/15 05:04, Marek Lindner wrote:
diff --git a/translation-table.c b/translation-table.c index e95a424..ae82f69 100644 --- a/translation-table.c +++ b/translation-table.c @@ -575,6 +575,11 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
/* increase the refcounter of the related vlan */ vlan = batadv_softif_vlan_get(bat_priv, vid);
- if (!vlan) {
WARN(1, "adding TT local entry %pM to non-existent VLAN %d",
addr, BATADV_PRINT_VID(vid));
WARN returns the value of the expression passed as first argument, therefore you can directly pass "!vlan" and use the whole macro invocation as if condition.
Note: if you are going to merge this patch before Sven's one you need to also include bug.h.
Cheers,