X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrftime.c;h=cfd41adbee8ba1a6c94d4a570df30e7ff70d3aca;hb=15bda956325f7804589f59d06bba2641b486ebf8;hp=a075717507ee38de9a482d5695accc87168137b2;hpb=317f6a262e98366cc859bb5ca7bb7a79a9a20548;p=gnulib.git diff --git a/lib/strftime.c b/lib/strftime.c index a07571750..cfd41adbe 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -104,7 +104,13 @@ static char const * const months[] = /* Add character C to STRING and increment LENGTH, unless LENGTH would exceed MAX. */ -#define add_char(c) (length + 1 <= max) && (string[length++] = (c)) +#define add_char(c) \ + do \ + { \ + if (length + 1 <= max) \ + string[length++] = (c); \ + } \ + while (0) /* Add a 2 digit number to STRING, padding if specified. Return the number of characters added, up to MAX. */