From 3ba487ca77dcab94aeb0280a0e175bd1fda75230 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 15 Aug 2011 19:32:30 +0000 Subject: unposted: use pm->node.nam to get names for parameters in errors --- Src/Modules/datetime.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Src') diff --git a/Src/Modules/datetime.c b/Src/Modules/datetime.c index 98bcd7d65..a4e7eca86 100644 --- a/Src/Modules/datetime.c +++ b/Src/Modules/datetime.c @@ -152,13 +152,13 @@ getcurrentsecs(UNUSED(Param pm)) } static double -getcurrentrealtime(UNUSED(Param pm)) +getcurrentrealtime(Param pm) { #ifdef HAVE_CLOCK_GETTIME struct timespec now; if (clock_gettime(CLOCK_REALTIME, &now) < 0) { - zwarn("EPOCHREALTIME: unable to retrieve time: %e", errno); + zwarn("%s: unable to retrieve time: %e", pm->node.nam, errno); return (double)0.0; } @@ -167,6 +167,7 @@ getcurrentrealtime(UNUSED(Param pm)) struct timeval now; struct timezone dummy_tz; + (void)pm; gettimeofday(&now, &dummy_tz); return (double)now.tv_sec + (double)now.tv_usec * 1e-6; @@ -174,7 +175,7 @@ getcurrentrealtime(UNUSED(Param pm)) } static char ** -getcurrenttime(UNUSED(Param pm)) +getcurrenttime(Param pm) { char **arr; char buf[DIGBUFSIZE]; @@ -183,7 +184,7 @@ getcurrenttime(UNUSED(Param pm)) struct timespec now; if (clock_gettime(CLOCK_REALTIME, &now) < 0) { - zwarn("EPOCHREALTIME: unable to retrieve time: %e", errno); + zwarn("%s: unable to retrieve time: %e", pm->node.nam, errno); return NULL; } @@ -199,6 +200,7 @@ getcurrenttime(UNUSED(Param pm)) struct timeval now; struct timezone dummy_tz; + (void)pm; gettimeofday(&now, &dummy_tz); arr = (char **)zhalloc(3 * sizeof(*arr)); -- cgit 1.4.1