lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120910095518.59ddae61@nehalam.linuxnetplumber.net>
Date:	Mon, 10 Sep 2012 09:55:18 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Julian Anastasov <ja@....bg>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] iproute2: add libgenl files

On Sat,  8 Sep 2012 12:48:24 +0300
Julian Anastasov <ja@....bg> 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ