summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-02-06 19:35:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-06 20:17:10 (GMT)
commitba285a712d8bc036d8f0d4625710305711b3c2cb (patch)
tree06bce07b4eea449d668520f10503100281cd0545 /t/helper
parentb819f1d2cec91e8c81b4d92ec787979ab2721aa6 (diff)
downloadgit-ba285a712d8bc036d8f0d4625710305711b3c2cb.zip
git-ba285a712d8bc036d8f0d4625710305711b3c2cb.tar.gz
git-ba285a712d8bc036d8f0d4625710305711b3c2cb.tar.bz2
test-date: drop unused parameter to getnanos()
The getnanos() helper always gets the current time from our getnanotime() facility. The caller cannot override it via TEST_DATE_NOW, and hence we simply ignore the "now" parameter to the function. Let's remove it, as it may mislead callers into thinking it does something. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-date.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/helper/test-date.c b/t/helper/test-date.c
index 792a805..f9e2b91 100644
--- a/t/helper/test-date.c
+++ b/t/helper/test-date.c
@@ -83,7 +83,7 @@ static void parse_approx_timestamp(const char **argv, struct timeval *now)
}
}
-static void getnanos(const char **argv, struct timeval *now)
+static void getnanos(const char **argv)
{
double seconds = getnanotime() / 1.0e9;
@@ -119,7 +119,7 @@ int cmd__date(int argc, const char **argv)
else if (!strcmp(*argv, "timestamp"))
parse_approx_timestamp(argv+1, &now);
else if (!strcmp(*argv, "getnanos"))
- getnanos(argv+1, &now);
+ getnanos(argv+1);
else if (!strcmp(*argv, "is64bit"))
return sizeof(timestamp_t) == 8 ? 0 : 1;
else if (!strcmp(*argv, "time_t-is64bit"))