Subject: bug#7325: new test failure due to non-portability of printf formats like %05.3s

From: Jim Meyering <[email-masked]>
Date: Sat, 06 Nov 2010 10:21:03 +0100

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)));