summaryrefslogtreecommitdiffstats
path: root/FunctionBar.c
diff options
context:
space:
mode:
authorMichael McConville <mmcconville ~a~ mykolab ~d~ com>2015-09-16 23:42:36 -0400
committerMichael McConville <mmcconville ~a~ mykolab ~d~ com>2015-09-16 23:42:36 -0400
commit445222e48c380bbb5d209a82f9614187bc751b41 (patch)
tree6d236f6744ed7a61a754385519395a2932d66d3b /FunctionBar.c
parent1d805b36b429f5157dd0de6f0b498941aa097941 (diff)
Clean up some needless malloc casts, convert some mallocs to callocs, and fix some style
Diffstat (limited to 'FunctionBar.c')
-rw-r--r--FunctionBar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/FunctionBar.c b/FunctionBar.c
index 55e1f9a2..ab44839a 100644
--- a/FunctionBar.c
+++ b/FunctionBar.c
@@ -52,8 +52,8 @@ FunctionBar* FunctionBar_new(const char** functions, const char** keys, int* eve
}
if (keys && events) {
this->staticData = false;
- this->keys = malloc(sizeof(char*) * 15);
- this->events = malloc(sizeof(int) * 15);
+ this->keys = calloc(15, sizeof(char*));
+ this->events = calloc(15, sizeof(int));
int i = 0;
while (i < 15 && functions[i]) {
this->keys[i] = strdup(keys[i]);

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