From 138af2e554871b83e23f13939314d7b749de2013 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 19 Mar 2018 11:57:15 +0100 Subject: [PATCH] Shut up signedness warning --- src/libexpr/primops/fetchGit.cc | 2 +- src/libexpr/primops/fetchMercurial.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libexpr/primops/fetchGit.cc b/src/libexpr/primops/fetchGit.cc index fd536c6a5..8bb74dad6 100644 --- a/src/libexpr/primops/fetchGit.cc +++ b/src/libexpr/primops/fetchGit.cc @@ -114,7 +114,7 @@ GitInfo exportGit(ref store, const std::string & uri, git fetch to update the local ref to the remote ref. */ struct stat st; doFetch = stat(localRefFile.c_str(), &st) != 0 || - st.st_mtime <= now - settings.tarballTtl; + st.st_mtime + settings.tarballTtl <= now; } if (doFetch) { diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc index 5517d83df..a75c5fc2d 100644 --- a/src/libexpr/primops/fetchMercurial.cc +++ b/src/libexpr/primops/fetchMercurial.cc @@ -80,7 +80,7 @@ HgInfo exportMercurial(ref store, const std::string & uri, time_t now = time(0); struct stat st; if (stat(stampFile.c_str(), &st) != 0 || - st.st_mtime <= now - settings.tarballTtl) + st.st_mtime + settings.tarballTtl <= now) { /* Except that if this is a commit hash that we already have, we don't have to pull again. */