From c4ae47d71e56569875c3a870cb2ec2bda9151b4f Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Wed, 9 Sep 2020 21:59:52 -0400 Subject: [PATCH] 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. --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 031f51f53..5d8729bda 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 `#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 ```c