From 0c51e5d2e5ce2ecf8bcd1720815c4de9d9264396 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Sat, 18 Jan 2020 16:57:45 +0100 Subject: content: Fix code in contributions --- content/en/docs/Contributions/_index.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'content') 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) ``` -- cgit v1.2.3