diff --git a/main.c b/main.c index 461456c..bdc905b 100644 --- a/main.c +++ b/main.c @@ -107,16 +107,16 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[], char host_ip int pid = ppid; int level = 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) { - sprintf(date, "%s", ctime(timet)); + sprintf(date, "%s", ctime(&timet)); }else { - time( timet ); - sprintf( date, "%s", ctime( timet)); + time( &timet ); + sprintf( date, "%s", ctime(&timet) ); date[strlen(date)-1] = 0; } while ( flag == 0)