Re: [PATCH] CodingStyle: Clarify and complete chapter 7

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

 



On Mon, 25 Jul 2016 14:29:06 +0200
Jean Delvare <jdelvare@xxxxxxx> wrote:

> Chapter 7 (Centralized exiting of functions) of the coding style
> documentation is unclear at times, and lacks some information (such
> as the possibility to indent labels with a single space.) Clarify and
> complete it.

OK, I've applied this (finally) to the docs tree, sorry for sitting on it
for so long.  One question, though...

>  A common type of bug to be aware of is "one err bugs" which look like this:
>  
> -	err:
> +	 err:
>  		kfree(foo->bar);
>  		kfree(foo);
>  		return ret;
>  
>  The bug in this code is that on some exit paths "foo" is NULL.  Normally the

...except that kfree() can handle null pointers just fine, so this isn't
actually a bug, right?  Someday when somebody has time it would be good to
come up with a better example.

Thanks,

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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux