summaryrefslogtreecommitdiffstats
path: root/unsupported
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-09-07 07:52:39 +0200
committerChristian Hesse <mail@eworm.de>2015-09-07 07:52:39 +0200
commite8970b6f3248e8c09480b0e9a5bddcee1fcddaca (patch)
tree805d2289d12bfe40cdd3272ff2ddb1c3eabc790d /unsupported
parent2df36ee2f291c12bbff30bc6433b76628ea11f0a (diff)
fix calloc() calls
* size_t nmemb (number of elements) first, then size_t size * do not assume char is size 1 but use sizeof() * allocate for char, not pointer to char (found by Michael McConville, fixes #261)
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/UnsupportedProcess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/UnsupportedProcess.c b/unsupported/UnsupportedProcess.c
index 47760a6d..87ac75fd 100644
--- a/unsupported/UnsupportedProcess.c
+++ b/unsupported/UnsupportedProcess.c
@@ -17,7 +17,7 @@ in the source distribution for its full text.
}*/
Process* UnsupportedProcess_new(Settings* settings) {
- Process* this = calloc(sizeof(Process), 1);
+ Process* this = calloc(1, sizeof(Process));
Object_setClass(this, Class(Process));
Process_init(this, settings);
return this;

© 2014-2024 Faster IT GmbH | imprint | privacy policy