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>
Jeff King committed
Feb 6, 2019 at 14:35 UTC
ba285a712d8bc036d8f0d4625710305711b3c2cb
1 file changed
+2
-2
t/helper/test-date.c
+2
-2
@@ -83,7 +83,7 @@ static void parse_approx_timestamp(const char **argv, struct timeval *now)
83
}
84
}
85
86
-static void getnanos(const char **argv, struct timeval *now)
86
+static void getnanos(const char **argv)
87
{
88
double seconds = getnanotime() / 1.0e9;
89
@@ -119,7 +119,7 @@ int cmd__date(int argc, const char **argv)
119
else if (!strcmp(*argv, "timestamp"))
120
parse_approx_timestamp(argv+1, &now);
121
else if (!strcmp(*argv, "getnanos"))
122
- getnanos(argv+1, &now);
122
+ getnanos(argv+1);
123
else if (!strcmp(*argv, "is64bit"))
124
return sizeof(timestamp_t) == 8 ? 0 : 1;
125
else if (!strcmp(*argv, "time_t-is64bit"))