Paul Eggert wrote:
...
> Subject: [PATCH] stat: use e.g. %.3X instead of %X.%3:X for sub-second
> precision
Thanks again.
Here's one more small change I'm including, to
put braces around this four-line "for"-loop body:
[per HACKING's "Curly braces" guidelines]
diff --git a/src/stat.c b/src/stat.c
index cbf6d25..99f115b 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -562,10 +562,12 @@ out_epoch_sec (char *pformat, size_t prefix_len, struct
stat const *statbuf,
{
char *dst = pformat;
for (char const *src = dst; src < p; src++)
- if (*src == '-')
- frac_left_adjust = true;
- else
- *dst++ = *src;
+ {
+ if (*src == '-')
+ frac_left_adjust = true;
+ else
+ *dst++ = *src;
+ }
sec_prefix_len =
(dst - pformat
+ (frac_left_adjust ? 0 : sprintf (dst, "%d", w)));