Fixed: gcc 2.95 problem and initialzes memory

This commit is contained in:
fc_botelho 2005-09-02 17:31:23 +00:00
parent c9ca8dbc28
commit 8f5f608426

View File

@ -19,14 +19,15 @@ static void chm_traverse(chm_config_data_t *chm, cmph_uint8 *visited, cmph_uint3
chm_config_data_t *chm_config_new()
{
chm_config_data_t *chm = NULL;
chm_config_data_t *chm;
chm = (chm_config_data_t *)malloc(sizeof(chm_config_data_t));
assert(chm);
memset(chm,0,sizeof(chm_config_data_t));
chm->hashfuncs[0] = CMPH_HASH_JENKINS;
chm->hashfuncs[1] = CMPH_HASH_JENKINS;
chm->g = NULL;
chm->graph = NULL;
chm->hashes = NULL;
assert(chm);
return chm;
}
void chm_config_destroy(cmph_config_t *mph)