Skip to content

Commit fdbea08

Browse files
committed
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 <[email protected]>
1 parent d50a5e8 commit fdbea08

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Documentation/CodingGuidelines

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ For C programs:
315315
encouraged to have a blank line between the end of the declarations
316316
and the first statement in the block.
317317

318+
- Do not explicitly initialize global variables to 0 or NULL;
319+
instead, let BSS take care of the zero initialization.
320+
318321
- NULL pointers shall be written as NULL, not as 0.
319322

320323
- When declaring pointers, the star sides with the variable

0 commit comments

Comments
 (0)