Re: [PATCH] CodingGuidelines: let BSS do its job

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

 



On Wed, Jun 11, 2025 at 11:18 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> We have mentioned this in various reviews, but I didn't see it
> mentioned in the CodingGuildelines document.  Let's add it.

Yeah, thanks for maintaining this document!

> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
> ---
>  Documentation/CodingGuidelines | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
> index a0e7041c54..4d1d52aa37 100644
> --- a/Documentation/CodingGuidelines
> +++ b/Documentation/CodingGuidelines
> @@ -315,6 +315,9 @@ For C programs:
>     encouraged to have a blank line between the end of the declarations
>     and the first statement in the block.
>
> + - Do not explicitly initialize global variables to 0 or NULL;
> +   instead, let BSS take care of the zero initialization.

Looks good.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux