git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@121
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
if (!(set->catname=malloc(dot - name+1)))
RAISE_MALLOC;
if (!(set->catname=malloc(dot - name+1)))
RAISE_MALLOC;
- strncat(set->catname,name,dot-name);
+ strncpy(set->catname,name,dot-name);
+ set->catname[dot-name]='\0'; /* Just in case */
DEBUG1("This is for cat '%s'", set->catname);
return no_error;
}
DEBUG1("This is for cat '%s'", set->catname);
return no_error;
}
if (control_string == NULL)
return no_error;
if (gras_log_settings == NULL)
if (control_string == NULL)
return no_error;
if (gras_log_settings == NULL)
- TRY(gras_dynar_new(&gras_log_settings,sizeof(gras_log_setting_t*),_free_setting));
+ TRY(gras_dynar_new(&gras_log_settings,sizeof(gras_log_setting_t*),
+ _free_setting));
if (!(set = malloc(sizeof(gras_log_setting_t))))
RAISE_MALLOC;
if (!(set = malloc(sizeof(gras_log_setting_t))))
RAISE_MALLOC;
- TRYCATCH(_gras_log_cat_searchsub(&_GRAS_LOGV(root),set->catname,&cat),mismatch_error);
+ TRYCATCH(_gras_log_cat_searchsub(&_GRAS_LOGV(root),set->catname,&cat),
+ mismatch_error);
if (errcode == mismatch_error) {
DEBUG0("Store for further application");
DEBUG1("push %p to the settings",set);
if (errcode == mismatch_error) {
DEBUG0("Store for further application");
DEBUG1("push %p to the settings",set);
}
void gras_log_exit(void) {
}
void gras_log_exit(void) {
gras_dynar_free(gras_log_settings);
gras_dynar_free(gras_log_settings);