summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-02-05 09:34:33 +0000
committerJim Meyering <jim@meyering.net>2004-02-05 09:34:33 +0000
commite32369feb89b32426484d55f4f288a27109c646d (patch)
tree616eebb25cc6c95844d630d23eeed6b545b2e9ab /src
parentb13975e227bb73b0224dbfd3aedee4ca51566940 (diff)
downloadcoreutils-e32369feb89b32426484d55f4f288a27109c646d.tar.xz
(human_time): Accept time rather than pointer-to-const-time parameter,
for clarity. All callers changed.
Diffstat (limited to 'src')
-rw-r--r--src/stat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/stat.c b/src/stat.c
index 7b3efebc8..bc3cfb8cb 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -326,10 +326,10 @@ human_access (struct stat const *statbuf)
}
static char *
-human_time (time_t const *t, int t_ns)
+human_time (time_t t, int t_ns)
{
static char str[80];
- struct tm *tm = localtime (t);
+ struct tm *tm = localtime (&t);
if (tm == NULL)
{
G_fail = 1;
@@ -525,7 +525,7 @@ print_stat (char *pformat, char m, char const *filename, void const *data)
break;
case 'x':
strcat (pformat, "s");
- printf (pformat, human_time (&(statbuf->st_atime),
+ printf (pformat, human_time (statbuf->st_atime,
TIMESPEC_NS (statbuf->st_atim)));
break;
case 'X':
@@ -534,7 +534,7 @@ print_stat (char *pformat, char m, char const *filename, void const *data)
break;
case 'y':
strcat (pformat, "s");
- printf (pformat, human_time (&(statbuf->st_mtime),
+ printf (pformat, human_time (statbuf->st_mtime,
TIMESPEC_NS (statbuf->st_mtim)));
break;
case 'Y':
@@ -543,7 +543,7 @@ print_stat (char *pformat, char m, char const *filename, void const *data)
break;
case 'z':
strcat (pformat, "s");
- printf (pformat, human_time (&(statbuf->st_ctime),
+ printf (pformat, human_time (statbuf->st_ctime,
TIMESPEC_NS (statbuf->st_ctim)));
break;
case 'Z':