about summary refs log tree commit diff
path: root/Src/Modules/datetime.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-08-15 19:32:30 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-08-15 19:32:30 +0000
commit3ba487ca77dcab94aeb0280a0e175bd1fda75230 (patch)
tree88e182586de10ac5e84f8b9cf58dd5b5c2782023 /Src/Modules/datetime.c
parent512660352feb89ae046639a7ebf6d43e888c17d9 (diff)
downloadzsh-3ba487ca77dcab94aeb0280a0e175bd1fda75230.tar.gz
zsh-3ba487ca77dcab94aeb0280a0e175bd1fda75230.tar.xz
zsh-3ba487ca77dcab94aeb0280a0e175bd1fda75230.zip
unposted: use pm->node.nam to get names for parameters in errors
Diffstat (limited to 'Src/Modules/datetime.c')
-rw-r--r--Src/Modules/datetime.c10
1 files changed, 6 insertions, 4 deletions
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));