1
0
This commit is contained in:
Daniel Tartavel 2020-05-07 19:19:34 +02:00
parent 66a123aa99
commit d7c386cc9b

10
main.c
View File

@ -107,16 +107,16 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[], char host_ip
int pid = ppid; int pid = ppid;
int level = 0; int level = 0;
int retval = 0; int retval = 0;
time_t *timet=0; time_t timet=0;
getutmp( pid, user, host_ip, timet ); getutmp( pid, user, host_ip, &timet );
if ( timet != 0) if ( timet != 0)
{ {
sprintf(date, "%s", ctime(timet)); sprintf(date, "%s", ctime(&timet));
}else }else
{ {
time( timet ); time( &timet );
sprintf( date, "%s", ctime( timet)); sprintf( date, "%s", ctime(&timet) );
date[strlen(date)-1] = 0; date[strlen(date)-1] = 0;
} }
while ( flag == 0) while ( flag == 0)