summaryrefslogtreecommitdiff
path: root/Documentation/CodingGuidelines
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-06-11 14:16:58 -0700
committerJunio C Hamano <gitster@pobox.com>2025-06-11 14:17:39 -0700
commitfdbea0870e4abecfa28eb5b196104fcd18e1c6d1 (patch)
tree554c706737045e5766d658f547ce9da85ebaf0b6 /Documentation/CodingGuidelines
parentd50a5e8939abfc07c2ff97ae72e9330939b36ee0 (diff)
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>
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r--Documentation/CodingGuidelines3
1 files changed, 3 insertions, 0 deletions
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