diff --git a/src/cmph_structs.c b/src/cmph_structs.c index 553db3d..30790bf 100644 --- a/src/cmph_structs.c +++ b/src/cmph_structs.c @@ -8,12 +8,13 @@ cmph_config_t *__config_new(cmph_io_adapter_t *key_source) { cmph_config_t *mph = (cmph_config_t *)malloc(sizeof(cmph_config_t)); + memset(mph, 0, sizeof(cmph_config_t)); DEBUGP("Creating mph with algorithm %s\n", cmph_names[algo]); if (mph == NULL) return NULL; mph->key_source = key_source; mph->verbosity = 0; mph->data = NULL; - float c = 0; + mph->c = 0; return mph; }