Move variable declerations to start of file
This commit is contained in:
parent
a30dffcf5d
commit
5bc96bc7f4
1 changed files with 6 additions and 6 deletions
12
sessions.h
12
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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue