[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01307571-e5dd-6756-897e-0b107b4d4271@gmail.com>
Date: Sun, 11 Feb 2018 18:15:20 -0700
From: David Ahern <dsahern@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>,
Serhey Popovych <serhe.popovych@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next v2 1/4] utils: Introduce and use
inet_prefix_reset_flags()
On 2/11/18 4:48 PM, Stephen Hemminger wrote:
> On Sun, 11 Feb 2018 22:02:30 +0200
> Serhey Popovych <serhe.popovych@...il.com> wrote:
>
>> +static inline void inet_prefix_reset_flags(inet_prefix *p)
>> +{
>> + p->flags = 0;
>> +}
>
> Just do it.
>
> Wrapper adds nothing here.
>
I asked for a wrapper to flags b/c embedding 'p->flags = 0' into code
hides what it is doing - which is resetting the address type in
inet_prefix. If inet_prefix is hiding address family and address type
details from the main ip code, details of how it works should be opaque
to that code.
Powered by blists - more mailing lists