@ -155,8 +155,7 @@ create(const char *id) {
if ((cfg = calloc(1, sizeof(cfg_t))) == NULL)
return NULL;
strncpy(cfg->name, id, sizeof(cfg->name));
snprintf(cfg->name, sizeof(cfg->name), "%s", id);
cfg->name[ID_MAX] = '\0';
return cfg;
}
@ -35,8 +35,7 @@ create(const char *id) {
strncpy(cfg->id, id, sizeof(cfg->id));
snprintf(cfg->id, sizeof(cfg->id), "%s", id);
cfg->id[sizeof(cfg->id) - 1] = '\0';