summaryrefslogtreecommitdiff
path: root/accel-pppd/main.c
diff options
context:
space:
mode:
authorDmitriyEshenko <snooppy@mail.ua>2019-08-15 13:18:58 +0300
committerDmitriyEshenko <snooppy@mail.ua>2019-08-15 13:18:58 +0300
commit3c73bb1899278ea295dcee1bdac45ebf10e6216c (patch)
treed0871da4b647e3fb0631740f5fff7b171fa4e6e3 /accel-pppd/main.c
parent6ce96d9d6eb3fa036d73aaf535784caddc7f3552 (diff)
downloadaccel-ppp-3c73bb1899278ea295dcee1bdac45ebf10e6216c.tar.gz
accel-ppp-3c73bb1899278ea295dcee1bdac45ebf10e6216c.zip
Make gcc8 happy
Diffstat (limited to 'accel-pppd/main.c')
-rw-r--r--accel-pppd/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/main.c b/accel-pppd/main.c
index e31a81cd..cb7e1cda 100644
--- a/accel-pppd/main.c
+++ b/accel-pppd/main.c
@@ -146,6 +146,7 @@ static void close_all_fd(void)
static void __core_restart(int soft)
{
char exe[PATH_MAX];
+ char exe_buf[PATH_MAX];
pthread_sigmask(SIG_SETMASK, &orig_set, NULL);
@@ -157,7 +158,7 @@ static void __core_restart(int soft)
close_all_fd();
sprintf(exe, "/proc/%u/exe", getpid());
- readlink(exe, exe, PATH_MAX);
+ readlink(exe, exe_buf, PATH_MAX);
while (1) {
execv(exe, argv);
@@ -180,6 +181,7 @@ static void sigsegv(int num)
char cmd[128];
char dump[128];
char exec_file[PATH_MAX];
+ char exec_file_buf[PATH_MAX];
pid_t pid;
FILE *f;
int fd;
@@ -213,7 +215,7 @@ static void sigsegv(int num)
fclose(f);
sprintf(exec_file, "/proc/%s/exe", pid_str);
- readlink(exec_file, exec_file, PATH_MAX);
+ readlink(exec_file, exec_file_buf, PATH_MAX);
execlp("gdb", "gdb", "-x", cmd, exec_file, pid_str, NULL);
perror("exec");