From c7c7a33ef6b634736b8d3dba4417748169933b89 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 2 Apr 2000 21:25:29 +0000 Subject: [PATCH] rename all st_mtime variables to avoid conflict with #define. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8087 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftp/cmds.c | 4 ++-- appl/ftp/ftpd/ftpcmd.y | 4 ++-- appl/ftp/ftpd/ls.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/appl/ftp/ftp/cmds.c b/appl/ftp/ftp/cmds.c index b7ac1110c..dcb18b6d8 100644 --- a/appl/ftp/ftp/cmds.c +++ b/appl/ftp/ftp/cmds.c @@ -647,7 +647,7 @@ getit(int argc, char **argv, int restartit, char *mode) int cmdret; int yy, mo, day, hour, min, sec; struct tm *tm; - time_t st_mtime = stbuf.st_mtime; + time_t mtime = stbuf.st_mtime; overbose = verbose; if (debug == 0) @@ -666,7 +666,7 @@ getit(int argc, char **argv, int restartit, char *mode) return (0); } - tm = gmtime(&st_mtime); + tm = gmtime(&mtime); tm->tm_mon++; tm->tm_year += 1900; diff --git a/appl/ftp/ftpd/ftpcmd.y b/appl/ftp/ftpd/ftpcmd.y index 284884258..5f5ea6906 100644 --- a/appl/ftp/ftpd/ftpcmd.y +++ b/appl/ftp/ftpd/ftpcmd.y @@ -620,9 +620,9 @@ cmd "%s: not a plain file.", $3); } else { struct tm *t; - time_t st_mtime = stbuf.st_mtime; + time_t mtime = stbuf.st_mtime; - t = gmtime(&st_mtime); + t = gmtime(&mtime); reply(213, "%04d%02d%02d%02d%02d%02d", t->tm_year + 1900, diff --git a/appl/ftp/ftpd/ls.c b/appl/ftp/ftpd/ls.c index 6b2a6fc04..09c583fda 100644 --- a/appl/ftp/ftpd/ls.c +++ b/appl/ftp/ftpd/ls.c @@ -177,10 +177,10 @@ make_fileinfo(const char *filename, struct fileinfo *file, int flags) { time_t t = time(NULL); - time_t st_mtime = st->st_mtime; - struct tm *tm = localtime(&st_mtime); - if((t - st_mtime > 6*30*24*60*60) || - (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);