diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2005-01-30 23:24:42 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2005-01-30 23:24:42 +0000 |
| commit | 5c0aeff2f3ec72ad4d11679a8c0a488d2b8ff0f0 (patch) | |
| tree | 3cbf5cd2bbcbacdfe490157309be1f9636a571ec /usr.bin | |
| parent | 78a3ed6c10c47a3f7d9f29c08684bad02be21de1 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/make/main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 284cfe2437d2..6fb44dd789d8 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -188,7 +188,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { MFLAGS_append("-I", optarg); break; case 'V': - (void)Lst_AtEnd(variables, (void *)optarg); + Lst_AtEnd(variables, estrdup(optarg)); MFLAGS_append("-V", optarg); break; case 'X': @@ -276,9 +276,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { break; } case 'E': - p = emalloc(strlen(optarg) + 1); - (void)strcpy(p, optarg); - (void)Lst_AtEnd(envFirstVars, (void *)p); + Lst_AtEnd(envFirstVars, estrdup(optarg)); MFLAGS_append("-E", optarg); break; case 'e': @@ -286,7 +284,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { MFLAGS_append("-e", NULL); break; case 'f': - (void)Lst_AtEnd(makefiles, (void *)optarg); + Lst_AtEnd(makefiles, estrdup(optarg)); break; case 'i': ignoreErrors = TRUE; @@ -902,8 +900,8 @@ main(int argc, char **argv) Lst_Destroy(targs, NOFREE); } - Lst_Destroy(variables, NOFREE); - Lst_Destroy(makefiles, NOFREE); + Lst_Destroy(variables, free); + Lst_Destroy(makefiles, free); Lst_Destroy(create, (void (*)(void *)) free); /* print the graph now it's been processed if the user requested it */ |
