diff options
author | Jim Meyering <jim@meyering.net> | 1993-10-04 21:20:37 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-10-04 21:20:37 +0000 |
commit | 3134fad324dee63431db43cf9fc82072cb004770 (patch) | |
tree | bed6afd9e143b51ee02ee2aa84a81a020daf3e15 /lib/strftime.c | |
parent | ae0074289cd7d70cf8fb1d96f2625b2b9bb62b29 (diff) | |
download | coreutils-3134fad324dee63431db43cf9fc82072cb004770.tar.xz |
merge with 1.8.1a
Diffstat (limited to 'lib/strftime.c')
-rw-r--r-- | lib/strftime.c | 8 |
1 files changed, 7 insertions, 1 deletions
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. */ |