[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130602040509.GD26681@mail.gmail.com>
Date: Sat, 1 Jun 2013 22:05:09 -0600
From: Jean Sacren <sakiwit@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
From: Joe Perches <joe@...ches.com>
Date: Sat, 01 Jun 2013 20:24:14 -0700
>
> On Sat, 2013-06-01 at 21:18 -0600, Jean Sacren wrote:
> > From: Joe Perches <joe@...ches.com>
> > Date: Sat, 01 Jun 2013 19:40:03 -0700
> > >
> > > On Sat, 2013-06-01 at 20:23 -0600, Jean Sacren wrote:
> > > > Clean up unnecessary initialization of enumerators as the compiler takes
> > > > care of that.
> > > []
> > > > diff --git a/include/linux/net.h b/include/linux/net.h
> > > []
> > > > enum sock_shutdown_cmd {
> > > > - SHUT_RD = 0,
> > > > - SHUT_WR = 1,
> > > > - SHUT_RDWR = 2,
> > > > + SHUT_RD,
> > > > + SHUT_WR,
> > > > + SHUT_RDWR,
> > > > };
> > >
> > > The compiler may do the same thing,
> > > but specificity is good.
> >
> > Thank you for your input. Could you elaborate on 'specificity' in this
> > specific case?
>
> Wpecifically, it's easier to see what the particular
> SHUT_<foo> value is when you grep for without looking
> through and counting the entire enum.
You don't need to look through and count. 'wc -l' shall tell and it's a
very small number.
With the specificity, it undervalues the power of the order of those
three enumerators. Nevertheless, I enjoyed learning from you and it's
better than SNL.
--
Jean Sacren
--
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