As vodz just pointed out, I screwup up the call to bb_xasprintf!

This commit is contained in:
Eric Andersen 2003-09-12 08:39:05 +00:00
parent 7f2935ba0e
commit eb213bd2a2

View File

@ -1023,7 +1023,7 @@ static int doit(char *str)
static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *opt) static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *opt)
{ {
int i; int i;
char *buf[100]; char *buf;
for (i = 0; i < ifd->n_options; i++) { for (i = 0; i < ifd->n_options; i++) {
if (strcmp(ifd->option[i].name, opt) == 0) { if (strcmp(ifd->option[i].name, opt) == 0) {
if (!(*exec) (ifd->option[i].value)) { if (!(*exec) (ifd->option[i].value)) {
@ -1032,7 +1032,7 @@ static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *o
} }
} }
bb_xasprintf(buf, "run-parts /etc/network/if-%s.d", opt); bb_xasprintf(&buf, "run-parts /etc/network/if-%s.d", opt);
(*exec)(buf); (*exec)(buf);
return (1); return (1);