summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2022-04-04 10:56:24 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-04-04 10:56:24 -0700
commit77ceb113420ce73c35bdea47cb320b08ed1ab0e9 (patch)
tree817e6e6261445cd5fdf6dd2af6cc2c8d93235703
parentMerge branch 'vd/mv-refresh-stat' (diff)
parentCodingGuidelines: give deadline for "for (int i = 0; ..." (diff)
downloadtgif-77ceb113420ce73c35bdea47cb320b08ed1ab0e9.tar.xz
Merge branch 'jc/coding-guidelines-decl-in-for-loop'
Coding Guidelines clarification. * jc/coding-guidelines-decl-in-for-loop: CodingGuidelines: give deadline for "for (int i = 0; ..."
-rw-r--r--Documentation/CodingGuidelines5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 1a7bc4591c..b20b2f94f1 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -227,7 +227,10 @@ For C programs:
the first statement (i.e. -Wdeclaration-after-statement).
- Declaring a variable in the for loop "for (int i = 0; i < 10; i++)"
- is still not allowed in this codebase.
+ is still not allowed in this codebase. We are in the process of
+ allowing it by waiting to see that 44ba10d6 (revision: use C99
+ declaration of variable in for() loop, 2021-11-14) does not get
+ complaints. Let's revisit this around November 2022.
- NULL pointers shall be written as NULL, not as 0.