git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Christian Couder <christian.couder@gmail.com>
Date
Jun 12, 2025, 07:40 UTC
Message-ID
<CAP8UFD34VpH7qQb2HwVR-YqcBbM6-Mo6ivdhcgN_DbLi0LT3zg@mail.gmail.com>
In-Reply-To
<xmqqh60mger9.fsf@gitster.g>
On Wed, Jun 11, 2025 at 11:18 PM Junio C Hamano <gitster@pobox.com> 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!
Show 15 quoted lines
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  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.
Previous: Junio C Hamano
Message 2 of 2 in “CodingGuidelines: let BSS do its job”
  1. CodingGuidelines: let BSS do its jobJunio C Hamano, Jun 11, 2025
  2. Christian CouderJun 12, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.