{"thread":{"id":"63627","subject":"[PATCH] CodingGuidelines: let BSS do its job","startedAt":"2025-06-11T21:17:00Z","lastAt":"2025-06-12T07:40:24Z","messageCount":2,"participants":["Junio C Hamano","Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"520123","messageId":"xmqqh60mger9.fsf@gitster.g","threadId":"63627","inReplyTo":null,"subject":"[PATCH] CodingGuidelines: let BSS do its job","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-06-11T21:16:58Z","receivedAt":"2025-06-11T21:17:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"We have mentioned this in various reviews, but I didn't see it\nmentioned in the CodingGuildelines document.  Let's add it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/CodingGuidelines | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\nindex a0e7041c54..4d1d52aa37 100644\n--- a/Documentation/CodingGuidelines\n+++ b/Documentation/CodingGuidelines\n@@ -315,6 +315,9 @@ For C programs:\n    encouraged to have a blank line between the end of the declarations\n    and the first statement in the block.\n \n+ - Do not explicitly initialize global variables to 0 or NULL;\n+   instead, let BSS take care of the zero initialization.\n+\n  - NULL pointers shall be written as NULL, not as 0.\n \n  - When declaring pointers, the star sides with the variable\n-- \n2.50.0-rc2-207-gc448ca4963\n\n"},{"id":"520166","messageId":"CAP8UFD34VpH7qQb2HwVR-YqcBbM6-Mo6ivdhcgN_DbLi0LT3zg@mail.gmail.com","threadId":"63627","inReplyTo":"xmqqh60mger9.fsf@gitster.g","subject":"Re: [PATCH] CodingGuidelines: let BSS do its job","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2025-06-12T07:40:10Z","receivedAt":"2025-06-12T07:40:24Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Wed, Jun 11, 2025 at 11:18 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> We have mentioned this in various reviews, but I didn't see it\n> mentioned in the CodingGuildelines document.  Let's add it.\n\nYeah, thanks for maintaining this document!\n\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  Documentation/CodingGuidelines | 3 +++\n>  1 file changed, 3 insertions(+)\n>\n> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\n> index a0e7041c54..4d1d52aa37 100644\n> --- a/Documentation/CodingGuidelines\n> +++ b/Documentation/CodingGuidelines\n> @@ -315,6 +315,9 @@ For C programs:\n>     encouraged to have a blank line between the end of the declarations\n>     and the first statement in the block.\n>\n> + - Do not explicitly initialize global variables to 0 or NULL;\n> +   instead, let BSS take care of the zero initialization.\n\nLooks good.\n"}]}