date: Fix tests by initializing timespec structure

The tests related to nanosecond support were failing on amd64 due to
uninitialized timespec structure.

Fixes:		eeb04a736c date: Add support for nanoseconds
Reviewed by:	markj
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44975
This commit is contained in:
Mateusz Piotrowski 2024-04-26 17:19:18 +02:00
parent 5626f9e790
commit 7b390cb636

View File

@ -96,6 +96,8 @@ main(int argc, char *argv[])
(void) setlocale(LC_TIME, "");
rflag = 0;
Iflag = jflag = Rflag = 0;
ts.tv_sec = 0;
ts.tv_nsec = 0;
while ((ch = getopt(argc, argv, "f:I::jnRr:uv:z:")) != -1)
switch((char)ch) {
case 'f':