CodingGuidelines: let BSS do its job

We have mentioned this in various reviews, but I didn't see it
mentioned in the CodingGuildelines document.  Let's add it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Junio C Hamano 2025-06-11 14:16:58 -07:00
parent d50a5e8939
commit fdbea0870e
1 changed files with 3 additions and 0 deletions

View File

@ -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.

- NULL pointers shall be written as NULL, not as 0.

- When declaring pointers, the star sides with the variable