about summary refs log tree commit diff
path: root/time/strftime_l.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/strftime_l.c')
-rw-r--r--time/strftime_l.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/time/strftime_l.c b/time/strftime_l.c
index 439b971747..b5ba9ca937 100644
--- a/time/strftime_l.c
+++ b/time/strftime_l.c
@@ -715,12 +715,22 @@ __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format,
       format_char = *f;
       switch (format_char)
 	{
-#define DO_NUMBER(d, v) \
-	  digits = d > width ? d : width;				      \
-	  number_value = v; goto do_number
-#define DO_NUMBER_SPACEPAD(d, v) \
-	  digits = d > width ? d : width;				      \
-	  number_value = v; goto do_number_spacepad
+#define DO_NUMBER(d, v)				\
+	  do					\
+	    {					\
+	      digits = d > width ? d : width;	\
+	      number_value = v;			\
+	      goto do_number;			\
+	    }					\
+	  while (0)
+#define DO_NUMBER_SPACEPAD(d, v)		\
+	  do					\
+	    {					\
+	      digits = d > width ? d : width;	\
+	      number_value = v;			\
+	      goto do_number_spacepad;		\
+	    }					\
+	  while (0)
 
 	case L_('%'):
 	  if (modifier != 0)