CONTRIBUTING.md: Add note about sizeof style

Throughout the code base, sizeof is used with the struct name. To
maintain consistency, this should continue being used. It does however
differ from the kernel style guide and should be mentioned.
This commit is contained in:
Brian Ashworth 2020-09-09 21:59:52 -04:00
parent 7ca9ef12f8
commit c4ae47d71e

View file

@ -174,6 +174,12 @@ Keep the use of macros to a minimum, especially if a function can do the job. If
you do need to use them, try to keep them close to where they're being used and you do need to use them, try to keep them close to where they're being used and
`#undef` them after. `#undef` them after.
### Other Differences
For sizeof, please use the struct name instead of the variable name. This is the
style that is used throughout the code base and should continue being used to
maintain consistency.
### Example ### Example
```c ```c