Improve allocating system and integrate parser

emalloc remplaced with xcalloc/xmalloc/xrealloc
and easy wrappers for strings zmalloc/zcalloc/zrealloc
 - exit on fail
 - prevent size_t overflow

Integrate parser in src/
This commit is contained in:
Philippe Pepiot
2010-11-19 16:42:14 +01:00
parent 19ecd89d89
commit 82b17ea02f
25 changed files with 186 additions and 135 deletions

View File

@@ -196,7 +196,7 @@ init_status(void)
return;
}
conf.status_path = emalloc(strlen(home) + strlen(DEF_STATUS) + 2, sizeof(char));
conf.status_path = zmalloc(strlen(home) + strlen(DEF_STATUS) + 2);
sprintf(conf.status_path, "%s/"DEF_STATUS, home);
}