[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [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.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.