summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-02-21 08:15:10 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-02-21 08:15:10 +0000
commit70c98ff92db967d166fcadeb30f5ae6499ea59bf (patch)
treed57c8d302ca5077fd8d3a67ab14000106469687b /src/ls.c
parentc339d6843e3104e75c9a378da7be50dc9353e777 (diff)
downloadcoreutils-70c98ff92db967d166fcadeb30f5ae6499ea59bf.tar.xz
(time): Remove obsolete decl.
(get_current_time): gettimeofday always returns 0, so don't check its result.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/ls.c b/src/ls.c
index 7a5d32769..854b3355d 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1,5 +1,5 @@
/* `dir', `vdir' and `ls' directory listing programs for GNU.
- Copyright (C) 85, 88, 90, 91, 1995-2004 Free Software Foundation, Inc.
+ Copyright (C) 85, 88, 90, 91, 1995-2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -216,10 +216,6 @@ struct bin_str
const char *string; /* Pointer to the same */
};
-#ifndef STDC_HEADERS
-time_t time ();
-#endif
-
char *getgroup ();
char *getuser ();
@@ -3100,17 +3096,14 @@ get_current_time (void)
#if HAVE_GETTIMEOFDAY
{
struct timeval timeval;
- if (gettimeofday (&timeval, NULL) == 0)
- {
- current_time = timeval.tv_sec;
- current_time_ns = timeval.tv_usec * 1000 + 999;
- return;
- }
+ gettimeofday (&timeval, NULL);
+ current_time = timeval.tv_sec;
+ current_time_ns = timeval.tv_usec * 1000 + 999;
}
-#endif
-
+#else
current_time = time (NULL);
current_time_ns = 999999999;
+#endif
}
/* Print the user or group name NAME, with numeric id ID, using a