return;
}
if (!(*s = strdup(v)))
- exit_cleanup(RERR_MALLOC);
+ out_of_memory("string_set");
}
/* Copy the local_vars, duplicating any strings in the source. */
}
/* Find a section by name. Otherwise works like get_section. */
-static int getsectionbyname(char *name, local_vars *psectionDest)
+static int getsectionbyname(char *name)
{
int i;
for (i = section_list.count - 1; i >= 0; i--) {
- if (strwicmp(iSECTION(i).name, name) == 0) {
- if (psectionDest != NULL)
- copy_section(psectionDest, &iSECTION(i));
+ if (strwicmp(iSECTION(i).name, name) == 0)
break;
- }
}
return i;
/* it might already exist */
if (name) {
- i = getsectionbyname(name, NULL);
+ i = getsectionbyname(name);
if (i >= 0)
return i;
}