summary refs log tree commit diff
path: root/C-STYLE.md
diff options
context:
space:
mode:
Diffstat (limited to 'C-STYLE.md')
-rw-r--r--C-STYLE.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/C-STYLE.md b/C-STYLE.md
index e7921cd..7119800 100644
--- a/C-STYLE.md
+++ b/C-STYLE.md
@@ -112,10 +112,13 @@ but merely how to format it.
 
 * Initialize zeroed structs using `= { 0 }`.
 
-* Prefer `x+i` over `&x[i]`.
-
 * Prefer `i++` over `++i`.
 
+* Prefer `*x` over `x[0]`
+  (unless the same code also accesses `x[1]`, `x[2]` etc.)
+
+* Prefer `x+i` over `&x[i]`.
+
 * Do not use `NULL`.  Use `0` for null pointers.
   Remember to use `(char *)0` as a sentinel for execl(3).