From bb1d3fd141c33a98137edd9261a9adb9ea1d3753 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 26 Feb 2016 14:57:24 +0100 Subject: doc: updated workflow and corrected all mallocs lib/du_buff contained casted malloc's. --- doc/workflow.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'doc/workflow.txt') diff --git a/doc/workflow.txt b/doc/workflow.txt index e48375bb..02d13f64 100644 --- a/doc/workflow.txt +++ b/doc/workflow.txt @@ -21,13 +21,21 @@ int * a; instead of int *a; -- don't explicitly cast malloc, but do +- Don't explicitly cast malloc, but do your * = malloc (sizeof *your * len); -- when checking for invalid pointers use +or -if (ptr == NULL), instead of if (!ptr) +your * = malloc (sizeof (*your) * len); + +- When checking for invalid pointers use + +if (ptr == NULL) + +instead of + +if (!ptr) 3. Development workflow -- cgit v1.2.3