From 5bc96bc7f4f4b680792e8a601f4f79a6b261b322 Mon Sep 17 00:00:00 2001 From: sw1tchbl4d3 Date: Thu, 29 Jul 2021 17:29:38 +0200 Subject: [PATCH] Move variable declerations to start of file --- sessions.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sessions.h b/sessions.h index cc856e2..dd04e92 100644 --- a/sessions.h +++ b/sessions.h @@ -78,12 +78,12 @@ int ensuredir() { } void setsession(int pid, unsigned int ts_ttl) { - if (ts_ttl == 0) - return; - unsigned long long startts; char path[1024], ts_str[32]; + if (ts_ttl == 0) + return; + if (ensuredir() < 0 || getpstartts(pid, &startts) < 0) return; @@ -109,12 +109,12 @@ void setsession(int pid, unsigned int ts_ttl) { } int getsession(int pid, unsigned int ts_ttl) { - if (ts_ttl == 0) - return -1; - unsigned long long startts, current; char path[1024], ts_str[32]; + if (ts_ttl == 0) + return -1; + if (ensuredir() < 0 || getpstartts(pid, &startts) < 0) return -1;