]> git.ipfire.org Git - thirdparty/git.git/commitdiff
CodingGuidelines: let BSS do its job
authorJunio C Hamano <gitster@pobox.com>
Wed, 11 Jun 2025 21:16:58 +0000 (14:16 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Jun 2025 21:17:39 +0000 (14:17 -0700)
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>
Documentation/CodingGuidelines

index a0e7041c54b4976c565ef4f6ff26c612fa6a6303..4d1d52aa3710b514053a8d37ea28dd39e0978e53 100644 (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