diff options
author | Sander Vrijders <sander@ouroboros.rocks> | 2020-01-18 16:57:45 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2020-01-18 16:57:45 +0100 |
commit | 0c51e5d2e5ce2ecf8bcd1720815c4de9d9264396 (patch) | |
tree | 76c03ab1c9910133ff92beb7770ee1bcca29a6d6 /content/en/docs/Contributions | |
parent | 63c8d1c21586b8c1169f38aaaabe889d82643eac (diff) | |
download | website-0c51e5d2e5ce2ecf8bcd1720815c4de9d9264396.tar.gz website-0c51e5d2e5ce2ecf8bcd1720815c4de9d9264396.zip |
content: Fix code in contributions
Diffstat (limited to 'content/en/docs/Contributions')
-rw-r--r-- | content/en/docs/Contributions/_index.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/content/en/docs/Contributions/_index.md b/content/en/docs/Contributions/_index.md index 08fdb32..b5ffa5f 100644 --- a/content/en/docs/Contributions/_index.md +++ b/content/en/docs/Contributions/_index.md @@ -28,22 +28,31 @@ following exceptions: - Soft tabs are to be used instead of hard tabs - A space is to be inserted between a pointer and its object name upon declaration or in function signatures. Example: + ```C int * a; ``` + instead of + ```C int *a; ``` + - Don't explicitly cast malloc, but do + ```C ptr = malloc(sizeof(*ptr) * len); ``` + - When checking for invalid pointers use + ```C if (ptr == NULL) ``` + instead of + ```C if (!ptr) ``` |