diff options
Diffstat (limited to 'crypto/kerberosIV/appl/ftp/ftpd/ls.c')
-rw-r--r-- | crypto/kerberosIV/appl/ftp/ftpd/ls.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/kerberosIV/appl/ftp/ftpd/ls.c b/crypto/kerberosIV/appl/ftp/ftpd/ls.c index 97eb77e..6e2c9a1 100644 --- a/crypto/kerberosIV/appl/ftp/ftpd/ls.c +++ b/crypto/kerberosIV/appl/ftp/ftpd/ls.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -32,7 +32,7 @@ #include "ftpd_locl.h" -RCSID("$Id: ls.c,v 1.13 1999/11/20 20:49:41 assar Exp $"); +RCSID("$Id: ls.c,v 1.13.2.2 2000/06/23 02:51:09 assar Exp $"); struct fileinfo { struct stat st; @@ -164,9 +164,10 @@ make_fileinfo(const char *filename, struct fileinfo *file, int flags) { time_t t = time(NULL); - struct tm *tm = localtime(&st->st_mtime); - if((t - st->st_mtime > 6*30*24*60*60) || - (st->st_mtime - t > 6*30*24*60*60)) + time_t mtime = st->st_mtime; + struct tm *tm = localtime(&mtime); + if((t - mtime > 6*30*24*60*60) || + (mtime - t > 6*30*24*60*60)) strftime(buf, sizeof(buf), "%b %e %Y", tm); else strftime(buf, sizeof(buf), "%b %e %H:%M", tm); |