Fixed: gcc 2.95 problem and initialzes memory

This commit is contained in:
fc_botelho 2005-09-02 17:51:17 +00:00
parent 8f5f608426
commit e9a300f189

View File

@ -8,12 +8,13 @@
cmph_config_t *__config_new(cmph_io_adapter_t *key_source) cmph_config_t *__config_new(cmph_io_adapter_t *key_source)
{ {
cmph_config_t *mph = (cmph_config_t *)malloc(sizeof(cmph_config_t)); 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]); DEBUGP("Creating mph with algorithm %s\n", cmph_names[algo]);
if (mph == NULL) return NULL; if (mph == NULL) return NULL;
mph->key_source = key_source; mph->key_source = key_source;
mph->verbosity = 0; mph->verbosity = 0;
mph->data = NULL; mph->data = NULL;
float c = 0; mph->c = 0;
return mph; return mph;
} }