Thread (7 messages) flat view 7 messages, 2 authors, 2012-09-10

Re: [PATCH 1/2] iproute2: add libgenl files

From: Stephen Hemminger <hidden>
Date: 2012-09-10 16:55:48

On Sat,  8 Sep 2012 12:48:24 +0300
Julian Anastasov [off-list ref] wrote:
+
+#define GENL_INIT_REQUEST(req, family, hdrsize, ver, cmd_, flags)	\
+	do {								\
+		memset(&req, 0, sizeof(req));				\
+		req.n.nlmsg_type = family;				\
+		req.n.nlmsg_flags = flags;				\
+		req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN + hdrsize);	\
+		req.g.cmd = cmd_;					\
+		req.g.version = ver;					\
+	} while (0)
+
Why not an inline function, macro code is error prone.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help