From: Ken Raeburn Date: Fri, 21 Oct 2005 20:03:44 +0000 (+0000) Subject: Delete setting and testing of STAT_ONCE_PER_SECOND, just always do it X-Git-Tag: ms-bug-test-20060525~94 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c7819f47ec78c1aac4ea91558d400e97c910ac2;p=krb5.git Delete setting and testing of STAT_ONCE_PER_SECOND, just always do it git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17449 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index cab07d02b..cbb95706e 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,10 @@ +2005-10-21 Ken Raeburn + + * prof_file.c (profile_update_file_data): Drop test of + STAT_ONCE_PER_SECOND, just do it always. + * prof_int.h (stuct _prf_data_t): Likewise. + (STAT_ONCE_PER_SECOND): Don't define. + 2005-08-20 Ken Raeburn * configure.in: Use K5_AC_INIT instead of AC_INIT. diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c index f31347c37..265ccd6cf 100644 --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c @@ -304,9 +304,7 @@ errcode_t profile_update_file_data(prf_data_t data) #ifdef HAVE_STAT struct stat st; unsigned long frac; -#ifdef STAT_ONCE_PER_SECOND time_t now; -#endif #endif FILE *f; @@ -315,21 +313,17 @@ errcode_t profile_update_file_data(prf_data_t data) return retval; #ifdef HAVE_STAT -#ifdef STAT_ONCE_PER_SECOND now = time(0); if (now == data->last_stat && data->root != NULL) { k5_mutex_unlock(&data->lock); return 0; } -#endif if (stat(data->filespec, &st)) { retval = errno; k5_mutex_unlock(&data->lock); return retval; } -#ifdef STAT_ONCE_PER_SECOND data->last_stat = now; -#endif #if defined HAVE_STRUCT_STAT_ST_MTIMENSEC frac = st.st_mtimensec; #elif defined HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC diff --git a/src/util/profile/prof_int.h b/src/util/profile/prof_int.h index 1a56a3f30..3ff2b0f51 100644 --- a/src/util/profile/prof_int.h +++ b/src/util/profile/prof_int.h @@ -15,8 +15,6 @@ #include "com_err.h" #include "profile.h" -#define STAT_ONCE_PER_SECOND - #if defined(_WIN32) #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 @@ -38,9 +36,7 @@ struct _prf_data_t { prf_magic_t magic; k5_mutex_t lock; struct profile_node *root; -#ifdef STAT_ONCE_PER_SECOND time_t last_stat; -#endif time_t timestamp; /* time tree was last updated from file */ unsigned long frac_ts; /* fractional part of timestamp, if any */ int flags; /* r/w, dirty */