lkml.org 
[lkml]   [2023]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/1] netlink: Don't use int as bool in netlink_update_socket_mc()
On Thu, Jun 29, 2023 at 09:55:50PM +0300, Andy Shevchenko wrote:
> On Thu, Jun 29, 2023 at 05:11:23PM +0200, Simon Horman wrote:
> > On Thu, Jun 29, 2023 at 04:31:31PM +0300, Andy Shevchenko wrote:
>
> > > - int old, new = !!is_new, subscriptions;
> > > + int subscriptions;
> > > + bool old;
> > >
> > > old = test_bit(group - 1, nlk->groups);
> > > subscriptions = nlk->subscriptions - old + new;
> >
> > Hi Andy,
> >
> > Doing arithmetic with boolean values doesn't seem right to me.
>
> In any case it does not change the status quo, the same still applies to
> the existing code (that's implied in the commit message). And obfuscating
> it for the sake of purity seems wrong to me. Hence this patch.

Yes, sure. That is true.

> > In any case, net-next is closed.
> > Please consider reposting once it re-opens, after 10th July.
>
> Sure.
>
> Thank you for the review!
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
>

\
 
 \ /
  Last update: 2023-06-29 21:26    [W:0.040 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site