[systemd-devel] [PATCH] sd-dhcp: implement IPv4 link-local support
Lennart Poettering
lennart at poettering.net
Fri Feb 28 04:07:35 PST 2014
On Fri, 28.02.14 09:17, Umut Tezduyar Lindskog (umut.tezduyar at axis.com) wrote:
> > > + } else if (ll->state == IPV4LL_STATE_WAITING_PROBE ||
> > > + ll->state == IPV4LL_STATE_PROBING ||
> > > + ll->state ==
> > > + IPV4LL_STATE_WAITING_ANNOUNCE) {
> > IN_SET...
>
> Sorry, didn't understand it. What is this?
IN_SET is a macro we have that makes comparison of a one variable
against a number of constants a bit nicer.
This:
if (ll->state == IPV4LL_STATE_WAITING_PROBE ||
ll->state == IPV4LL_STATE_PROBING ||
ll->state == IPV4LL_STATE_WAITING_ANNOUNCE) ...
Becomes this:
if (IN_SET(ll->state,
IPV4LL_STATE_WAITING_PROBE,
IPV4LL_STATE_PROBING,
IPV4LL_STATE_WAITING_ANNOUNCE) ...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list