[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D0F6C813A@AcuExch.aculab.com>
Date: Fri, 21 Feb 2014 13:16:51 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Andrew Bennieston' <andrew.bennieston@...rix.com>,
Paul Durrant <Paul.Durrant@...rix.com>,
"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>
CC: Ian Campbell <Ian.Campbell@...rix.com>,
Wei Liu <wei.liu2@...rix.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
David Vrabel <david.vrabel@...rix.com>
Subject: RE: [PATCH V4 net-next 2/5] xen-netback: Add support for multiple
queues
From: Of Andrew Bennieston
> >> + char *xspath = NULL;
> >
> > I don't think you need the NULL init here. xspath is set in both branches of the if statement below.
>
> Indeed, but I prefer to initialise things sanely where possible. It
> makes it easier to spot problems with later modifications of the code,
> e.g. if one of those branches changed.
If you don't initialise it the compiler is likely to detect the
fact than one code path hasn't set it.
If you initialise it, the compiler doesn't.
David
Powered by blists - more mailing lists