| variables |
| [ ] | use static local variables instead of global variables when possible |
| [ ] | mark variables static that are global within a file |
| [ ] | don't assign function or variable addresses to global variables |
| [ ] | don't use global variables as loop counters |
| [ ] | don't reuse the same variable for unrelated computations |
| [ ] | mark variables as const whenever possible |
| [ ] | avoid taking the address of a variable because address sizes vary between platforms |
| pointers |
| [ ] | minimize the use of pointers |
| [ ] | avoid having multiple pointers to one data area |
| [ ] | avoid accessing a variable both directly and via a pointer |
| [ ] | use array-based addresses instead of pointers: v[i++] rather than *v++ |
| [ ] | don't pass a pointer parameter into a function and then assign a global variable to it |
| [ ] | point to the beginning of structures, rather than the middle |
| functions |
| [ ] | mark functions static if possible |
| [ ] | use restrict when a function's parameters cannot point to the same variable |