aboutsummaryrefslogtreecommitdiff
path: root/docs/CODE_STYLE.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/CODE_STYLE.md')
-rw-r--r--docs/CODE_STYLE.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/CODE_STYLE.md b/docs/CODE_STYLE.md
index 0ceb5b9ad..561343752 100644
--- a/docs/CODE_STYLE.md
+++ b/docs/CODE_STYLE.md
@@ -244,3 +244,22 @@ depending on a build-time conditional:
#endif
int content = magic(3);
+
+## No typedefed structs
+
+Use structs by all means, but do not typedef them. Use the `struct name` way
+of identifying them:
+
+ struct something {
+ void *valid;
+ size_t way_to_write;
+ };
+ struct something instance;
+
+**Not okay**:
+
+ typedef struct {
+ void *wrong;
+ size_t way_to_write;
+ } something;
+ something instance;