[PATCH v2 2/6] ipsec: replace unnecessary comma operator
Morten Brørup
mb at smartsharesystems.com
Mon Aug 18 10:14:51 CEST 2025
> From: Bruce Richardson [mailto:bruce.richardson at intel.com]
> Sent: Monday, 18 August 2025 10.01
>
> On Thu, Aug 14, 2025 at 02:28:48PM -0700, Stephen Hemminger wrote:
> > Use of comma as statement separator is discouraged and
> > reported as warning by clang with -Wcomma
> >
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> > ---
> > - j = 0, n = 0;
> > + j = 0;
> > + n = 0;
> > vofs = 0;
> > for (i = 0; i != num; i++) {
> >
>
> A better fix here is to move the assignments up to where the variables are
> defined just 9 lines earlier, rather than wasting code lines by assigning
> to zero later on!
+1
More information about the dev
mailing list