Skip to content

Commit e30e446

Browse files
peffdscho
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 81dec28 commit e30e446

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/helper/test-date.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static void parse_approx_timestamp(const char **argv, struct timeval *now)
8383
}
8484
}
8585

86-
static void getnanos(const char **argv, struct timeval *now)
86+
static void getnanos(const char **argv)
8787
{
8888
double seconds = getnanotime() / 1.0e9;
8989

@@ -119,7 +119,7 @@ int cmd__date(int argc, const char **argv)
119119
else if (!strcmp(*argv, "timestamp"))
120120
parse_approx_timestamp(argv+1, &now);
121121
else if (!strcmp(*argv, "getnanos"))
122-
getnanos(argv+1, &now);
122+
getnanos(argv+1);
123123
else if (!strcmp(*argv, "is64bit"))
124124
return sizeof(timestamp_t) == 8 ? 0 : 1;
125125
else if (!strcmp(*argv, "time_t-is64bit"))

0 commit comments

Comments
 (0)