summaryrefslogtreecommitdiff
path: root/doc/workflow.txt
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2016-02-26 09:18:24 +0100
committerDimitri Staessens <[email protected]>2016-02-26 09:18:24 +0100
commit44fa4a0d43a4026a091f82a055c649aa7c922706 (patch)
tree42fb669fedbfc79ca0b09a1726810f82392da85d /doc/workflow.txt
parent74ec49125d0f5e01db376f13a627c892d6fcc68a (diff)
downloadouroboros-44fa4a0d43a4026a091f82a055c649aa7c922706.tar.gz
ouroboros-44fa4a0d43a4026a091f82a055c649aa7c922706.zip
workflow: Update guidelines on use of pointers
the void * returned by malloc should not be explicitly cast when checking pointers for validity, only use (ptr == NULL)
Diffstat (limited to 'doc/workflow.txt')
-rw-r--r--doc/workflow.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/workflow.txt b/doc/workflow.txt
index ee4afb95..e48375bb 100644
--- a/doc/workflow.txt
+++ b/doc/workflow.txt
@@ -21,6 +21,14 @@ int * a;
instead of
int *a;
+- don't explicitly cast malloc, but do
+
+your * = malloc (sizeof *your * len);
+
+- when checking for invalid pointers use
+
+if (ptr == NULL), instead of if (!ptr)
+
3. Development workflow
Git is used as a version tooling for the code. Releases are identified