Use pv_error() instead of writing directly to stderr.

This commit is contained in:
Andrew Wood
2026-04-18 20:33:07 +01:00
parent fc364d381f
commit 0af9cb2314
+1 -2
View File
@@ -25,10 +25,9 @@
*/
void pv_elapsedtime_read(struct timespec *return_time)
{
/* TODO: use pv_error() rather than fprintf(). */
/*@-unrecog@ *//* splint doesn't know clock_gettime. */
if (0 != clock_gettime(CLOCK_MONOTONIC, return_time)) {
fprintf(stderr, "%s: %s: %s\n", PACKAGE_NAME, "clock_gettime", strerror(errno));
pv_error("%s: %s", "clock_gettime", strerror(errno));
/*@-exitarg@ *//* The special exit status is explicitly chosen. */
exit(PV_ERROREXIT_TRANSFER);
/*@+exitarg@ */