mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 23:15:07 -05:00
test: fix sources unit test to call SRC_ReportSource() correctly
Call the function with current time instead of latest sample of the
first source to avoid undefined conversion of negative double to long
int.
Fixes: 07600cbd71 ("test: extend sources unit test")
This commit is contained in:
@@ -190,6 +190,7 @@ test_unit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < sizeof (srcs) / sizeof (srcs[0]); j++) {
|
for (j = 0; j < sizeof (srcs) / sizeof (srcs[0]); j++) {
|
||||||
|
SCH_GetLastEventTime(&sample.time, NULL, NULL);
|
||||||
SRC_ReportSource(j, &report, &sample.time);
|
SRC_ReportSource(j, &report, &sample.time);
|
||||||
SRC_DestroyInstance(srcs[j]);
|
SRC_DestroyInstance(srcs[j]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user