aboutsummaryrefslogtreecommitdiff
path: root/content/en/docs/Contributions
diff options
context:
space:
mode:
authorSander Vrijders <sander@ouroboros.rocks>2020-01-18 16:57:45 +0100
committerSander Vrijders <sander@ouroboros.rocks>2020-01-18 16:57:45 +0100
commit0c51e5d2e5ce2ecf8bcd1720815c4de9d9264396 (patch)
tree76c03ab1c9910133ff92beb7770ee1bcca29a6d6 /content/en/docs/Contributions
parent63c8d1c21586b8c1169f38aaaabe889d82643eac (diff)
downloadwebsite-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.md9
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)
```