From 833ffe26027512ec156dcc7bbdf78131165196cd Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 1 Sep 2015 16:38:36 +0200 Subject: Put dofile into static buffer --- redo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redo.c b/redo.c index 9d543db..781c828 100644 --- a/redo.c +++ b/redo.c @@ -201,7 +201,7 @@ redo_ifcreate(char *target) static char * check_dofile(const char *fmt, ...) { - char dofile[1024]; + static char dofile[1024]; va_list ap; va_start(ap, fmt); @@ -209,7 +209,7 @@ check_dofile(const char *fmt, ...) va_end(ap); if (access (dofile, F_OK) == 0) { - return strdup(dofile); + return dofile; } else { redo_ifcreate(dofile); return 0; -- cgit 1.4.1