Skip to content

Commit

Permalink
CodingGuidelines: Add a note to avoid assignments inside if()
Browse files Browse the repository at this point in the history
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Miklos Vajna authored and Junio C Hamano committed May 25, 2008
1 parent 633f43e commit 0b0b8cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Documentation/CodingGuidelines
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ For C programs:
of "else if" statements, it can make sense to add braces to
single line blocks.

- We try to avoid assignments inside if().

- Try to make your code understandable. You may put comments
in, but comments invariably tend to stale out when the code
they were describing changes. Often splitting a function
Expand Down

0 comments on commit 0b0b8cd

Please sign in to comment.