aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-05 06:31:53 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:56:34 -0500
commitf4d900a2cae94256f56be7769734100c7054bf00 (patch)
tree3991508447452b737d11769c5e1a8799812243bb /include
parenta59322be07c964e916d15be3df473fb7ba20c41e (diff)
[NETLINK]: Mark attribute construction exception unlikely
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netlink.h2
-rw-r--r--include/net/netlink.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index d5bfaba595c7..2aee0f510876 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -245,7 +245,7 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
245} 245}
246 246
247#define NLMSG_NEW(skb, pid, seq, type, len, flags) \ 247#define NLMSG_NEW(skb, pid, seq, type, len, flags) \
248({ if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) \ 248({ if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \
249 goto nlmsg_failure; \ 249 goto nlmsg_failure; \
250 __nlmsg_put(skb, pid, seq, type, len, flags); }) 250 __nlmsg_put(skb, pid, seq, type, len, flags); })
251 251
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 9298218c07f9..db4b935b6c7e 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -862,7 +862,7 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
862 862
863#define NLA_PUT(skb, attrtype, attrlen, data) \ 863#define NLA_PUT(skb, attrtype, attrlen, data) \
864 do { \ 864 do { \
865 if (nla_put(skb, attrtype, attrlen, data) < 0) \ 865 if (unlikely(nla_put(skb, attrtype, attrlen, data) < 0)) \
866 goto nla_put_failure; \ 866 goto nla_put_failure; \
867 } while(0) 867 } while(0)
868 868