A patch is attached. It also makes the lexer able to reconize CRLF as a
newline, which someone else needed. I didn't add any error messages in
the case of multicharacter strings. Perhaps it's not really Coccinelle's
problem...
julia
From nobody Fri Jan 28 15:12:18 CET 2011
From: Julia Lawall <[email protected]>
To: [email protected], [email protected], [email protected],
[email protected], [email protected]
Subject: [PATCH] include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL
argument
nlmsg_cancel can accept NULL as its second argument, so for similarity,
this patch extends genlmsg_cancel to be able to accept a NULL second
argument as well.
Signed-off-by: Julia Lawall <[email protected]>
---
include/net/genetlink.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 8a64b81..b4c7c1c 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -195,7 +195,8 @@ static inline int genlmsg_end(struct sk_buff *skb, void
*hdr)
*/
static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr)
{
- nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
+ if (hdr)
+ nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
}
/**
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)