From: Junio C Hamano Date: Wed, 11 Jun 2025 21:16:58 +0000 (-0700) Subject: CodingGuidelines: let BSS do its job X-Git-Tag: v2.51.0-rc0~114^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdbea0870e4abecfa28eb5b196104fcd18e1c6d1;p=thirdparty%2Fgit.git 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 --- 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. + - NULL pointers shall be written as NULL, not as 0. - When declaring pointers, the star sides with the variable