summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-02-27 12:26:35 +0100
committerSander Vrijders <[email protected]>2016-02-27 12:26:35 +0100
commite5bfc52e93654a8be7893cf5573c9c04e9c96c55 (patch)
treeec6f93a22f1724f8ddf0d082faaaef3f01e65d75 /doc
parent4bfc45d1bc97b3df8212e3fcf7f10cbb660a8259 (diff)
parent223813bbd609d929537b9f3f54bf4eec99d7663b (diff)
downloadouroboros-e5bfc52e93654a8be7893cf5573c9c04e9c96c55.tar.gz
ouroboros-e5bfc52e93654a8be7893cf5573c9c04e9c96c55.zip
Merged in dstaesse/ouroboros/be-update-workflow (pull request #11)
workflow: Update guidelines on use of pointers
Diffstat (limited to 'doc')
-rw-r--r--doc/workflow.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/workflow.txt b/doc/workflow.txt
index ee4afb95..a829192b 100644
--- a/doc/workflow.txt
+++ b/doc/workflow.txt
@@ -21,6 +21,18 @@ int * a;
instead of
int *a;
+- Don't explicitly cast malloc, but do
+
+ptr = malloc (sizeof(*ptr) * len);
+or
+ptr = malloc (sizeof *ptr * 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