From ae28a110ab4cd3721901099a9762c017630567a0 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Mon, 1 Jul 2024 20:00:32 +0530 Subject: [PATCH] Remove unused function (#2484) Also clean up some function prototypes. Co-authored-by: Takeshi Nakatani --- src/cache.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/cache.cpp b/src/cache.cpp index 3ab70fd5c7..ed448cb76f 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -33,7 +33,7 @@ //------------------------------------------------------------------- // Utility //------------------------------------------------------------------- -static inline void SetStatCacheTime(struct timespec& ts) +static void SetStatCacheTime(struct timespec& ts) { if(-1 == clock_gettime(static_cast(CLOCK_MONOTONIC_COARSE), &ts)){ S3FS_PRN_CRIT("clock_gettime failed: %d", errno); @@ -41,13 +41,7 @@ static inline void SetStatCacheTime(struct timespec& ts) } } -static inline void InitStatCacheTime(struct timespec& ts) -{ - ts.tv_sec = 0; - ts.tv_nsec = 0; -} - -static inline int CompareStatCacheTime(const struct timespec& ts1, const struct timespec& ts2) +static int CompareStatCacheTime(const struct timespec& ts1, const struct timespec& ts2) { // return -1: ts1 < ts2 // 0: ts1 == ts2 @@ -66,7 +60,7 @@ static inline int CompareStatCacheTime(const struct timespec& ts1, const struct return 0; } -static inline bool IsExpireStatCacheTime(const struct timespec& ts, const time_t& expire) +static bool IsExpireStatCacheTime(const struct timespec& ts, time_t expire) { struct timespec nowts; SetStatCacheTime(nowts);