Re: useless variable initializations

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

 



Hello,

> Is there any policy about useless variable intializations, such as:
> 
> struct foo *x = NULL;
> ...
> x = kmalloc(...);
> 
> where the original value of x is never used?

Once upon a time I send a few patches regarding this issue and they
were accepted although -02 flag makes both versions be the same
in the end. I'd say it is a cleanup. As you said useless variable
initializations are misleading. Methinks it decreases code readability
as well.

	Mariusz
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux