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>
Junio C Hamano committed
Jun 11, 2025 at 14:16 UTC
fdbea0870e4abecfa28eb5b196104fcd18e1c6d1
1 file changed
+3
Documentation/CodingGuidelines
+3
@@ -315,6 +315,9 @@ For C programs:
315
encouraged to have a blank line between the end of the declarations
316
and the first statement in the block.
317
318
+ - Do not explicitly initialize global variables to 0 or NULL;
319
+ instead, let BSS take care of the zero initialization.
320
+
321
- NULL pointers shall be written as NULL, not as 0.
322
323
- When declaring pointers, the star sides with the variable