Re: [PATCH] strftime: wrap macros in "do {...} while(0)"

2014-03-25 Thread Paul Eggert
Thanks again; I pushed that one too.

[PATCH] strftime: wrap macros in "do {...} while(0)"

2014-03-25 Thread Bernhard Voelker
* lib/strftime.c (DO_NUMBER): Wrap multi-statement code block of this macro in "do {...} while(0)" to prevent false use as a single statement, e.g., in an un-braced "{}" else-block. (DO_SIGNED_NUMBER, DO_TZ_OFFSET, DO_NUMBER_SPACEPAD): Likewise. (strftime_case_): Remove 'else' after 'goto' - which

Re: [PATCH] modechange: avoid memory leaks for invalid octal modes

2014-03-25 Thread Paul Eggert
Thanks, I pushed that.

[PATCH] modechange: avoid memory leaks for invalid octal modes

2014-03-25 Thread Bernhard Voelker
* lib/modechange.c (mode_compile): During the parsing of notations like +40, free the 'mc' buffer for invalid mode strings like +1 (greater than the maximum octal mode), =18 (bad octal mode characters) or u=1 ('affected' with octal modes). Reproducer, e.g.: $ valgrind --leak-check=full chm