From 0af9cb2314b96ec9f17a8c3c22e5d5618acaaf6e Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Sat, 18 Apr 2026 20:33:07 +0100 Subject: [PATCH] Use pv_error() instead of writing directly to stderr. --- src/pv/elapsedtime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pv/elapsedtime.c b/src/pv/elapsedtime.c index 2c8878a..e6210e8 100644 --- a/src/pv/elapsedtime.c +++ b/src/pv/elapsedtime.c @@ -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@ */