projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33cf956
)
(print_long_format): Don't dump core if strftime returns the empty string.
author
Jim Meyering
<jim@meyering.net>
Sun, 31 Dec 2000 08:55:41 +0000
(08:55 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sun, 31 Dec 2000 08:55:41 +0000
(08:55 +0000)
src/ls.c
patch
|
blob
|
history
diff --git
a/src/ls.c
b/src/ls.c
index ed1783da7e6faf8a7707759db051b834c4bae87b..ac9a37ab1f68786a07a8892412dc914b2de6453c 100644
(file)
--- a/
src/ls.c
+++ b/
src/ls.c
@@
-2453,7
+2453,10
@@
print_long_format (const struct fileinfo *f)
if ((when_local = localtime (&when)))
{
- while (! (s = strftime (p, buf + bufsize - p - 1, fmt, when_local)))
+ *p = '\1';
+
+ while (! (s = strftime (p, buf + bufsize - p - 1, fmt, when_local))
+ && *p)
{
char *newbuf = (char *) alloca (bufsize *= 2);
memcpy (newbuf, buf, p - buf);