From: paul Date: Thu, 29 May 2003 17:18:47 +0000 (+0000) Subject: lib/table.c: Fix the SET_LINK macro. (not that its of any worth) X-Git-Tag: frr-2.0-rc1~4016 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=9bca8ebc4fcc369ad17b9a8caf8b14e62ad87e4a;p=matthieu%2Ffrr.git lib/table.c: Fix the SET_LINK macro. (not that its of any worth) --- diff --git a/lib/table.c b/lib/table.c index 00ba58d953..281dfb642c 100644 --- a/lib/table.c +++ b/lib/table.c @@ -185,8 +185,8 @@ check_bit (u_char *prefix, u_char prefixlen) } /* Macro version of set_link (). */ -#define SET_LINK(X,Y) (X)->link[CHECK_BIT(&(Y)->prefix,(X)->prefixlen)] = (Y);\ - (Y)->parent = (X) +#define SET_LINK(X,Y) do { (X)->link[CHECK_BIT(&(Y)->p.u.prefix,(X)->p.prefixlen)] = (Y);\ + (Y)->parent = (X); } while (0) static void set_link (struct route_node *node, struct route_node *new)