Skip to content

Commit

Permalink
Remove unused function (s3fs-fuse#2484)
Browse files Browse the repository at this point in the history
Also clean up some function prototypes.

Co-authored-by: Takeshi Nakatani <[email protected]>
  • Loading branch information
gaul and ggtakec authored Jul 1, 2024
1 parent a6637b2 commit ae28a11
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,15 @@
//-------------------------------------------------------------------
// Utility
//-------------------------------------------------------------------
static inline void SetStatCacheTime(struct timespec& ts)
static void SetStatCacheTime(struct timespec& ts)
{
if(-1 == clock_gettime(static_cast<clockid_t>(CLOCK_MONOTONIC_COARSE), &ts)){
S3FS_PRN_CRIT("clock_gettime failed: %d", errno);
abort();
}
}

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
Expand All @@ -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);
Expand Down

0 comments on commit ae28a11

Please sign in to comment.