From 445222e48c380bbb5d209a82f9614187bc751b41 Mon Sep 17 00:00:00 2001 From: Michael McConville Date: Wed, 16 Sep 2015 23:42:36 -0400 Subject: Clean up some needless malloc casts, convert some mallocs to callocs, and fix some style --- FunctionBar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FunctionBar.c') 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]); -- cgit v1.2.3