aboutsummaryrefslogtreecommitdiff
path: root/src/prc1/prc1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prc1/prc1.c')
-rw-r--r--src/prc1/prc1.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/prc1/prc1.c b/src/prc1/prc1.c
index 634608b..bd481c1 100644
--- a/src/prc1/prc1.c
+++ b/src/prc1/prc1.c
@@ -41,13 +41,8 @@ int main(int argc, char *argv[])
fname = args.src;
}
- if (!(l.loc.f = malloc(strlen(fname) + 1)))
- {
- perror("malloc(3)");
+ if (!(l.loc.f = sdup(fname)))
goto end;
- }
- else
- strcpy(l.loc.f, fname);
l.args = a.args = &args;