X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=CODING_STYLE;h=2fa0c0b65b6c1315202741193b725b537f2bf2ff;hb=0491c221547a38b58e41fade9953cd1cf015288b;hp=e7fde1500384a07300d53f8c1b14151d6716bed1;hpb=8fbe3d1fcfa16c543f49f24e7cdfbf0024459341;p=mirror_qemu.git diff --git a/CODING_STYLE b/CODING_STYLE index e7fde15003..2fa0c0b65b 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -9,7 +9,7 @@ patches before submitting. Of course, the most important aspect in any coding style is whitespace. Crusty old coders who have trouble spotting the glasses on their noses can tell the difference between a tab and eight spaces from a distance -of approximately fifteen parsecs. Many a flamewar have been fought and +of approximately fifteen parsecs. Many a flamewar has been fought and lost on this issue. QEMU indents are four spaces. Tabs are never used, except in Makefiles @@ -116,3 +116,10 @@ if (a == 1) { Rationale: Yoda conditions (as in 'if (1 == a)') are awkward to read. Besides, good compilers already warn users when '==' is mis-typed as '=', even when the constant is on the right. + +7. Comment style + +We use traditional C-style /* */ comments and avoid // comments. + +Rationale: The // form is valid in C99, so this is purely a matter of +consistency of style. The checkpatch script will warn you about this.