datapath: Fully parenthesize ACTION macro.
authorBen Pfaff <blp@nicira.com>
Mon, 24 Oct 2011 22:18:49 +0000 (15:18 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 24 Oct 2011 22:45:59 +0000 (15:45 -0700)
This doesn't matter for any of the current users of ACTION, nor do I expect
it to matter, but it seems like a good idea nonetheless.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/datapath.c

index dab8631..be90d54 100644 (file)
@@ -552,7 +552,7 @@ static int validate_action_key(const struct nlattr *a,
            nla_len(ovs_key) != ovs_key_lens[key_type])
                return -EINVAL;
 
-#define ACTION(act, key)       ((act << 8) | key)
+#define ACTION(act, key)       (((act) << 8) | (key))
 
        switch(ACTION(act_type, key_type)) {
        const struct ovs_key_ipv4 *ipv4_key;