[PATCH v2 3/9] Remove duplicated code from __printf_fp_l, __printf_fphex, and __printf_size
Joseph Myers
joseph@codesourcery.com
Tue Jun 6 15:47:00 GMT 2017
On Fri, 2 Jun 2017, Gabriel F. T. Gomes wrote:
> +#define PRINTF_FP_FETCH(FLOAT, VAR, SUFFIX, MANT_DIG) \
> + { \
> + VAR = *(const FLOAT *) args[0]; \
Good practice would be to use (VAR) here, as a macro argument that might
not just be a single identifier.
> +#define PRINTF_FPHEX_FETCH(FLOAT, VAR) \
> + { \
> + VAR = *(const FLOAT *) args[0]; \
Likewise.
> +#define PRINTF_SIZE_FETCH(FLOAT, VAR) \
> + { \
> + VAR = *(const FLOAT *) args[0]; \
Likewise.
> + while (VAR >= divisor && tag[1] != '\0') \
Likewise.
> + { \
> + VAR /= divisor; \
Likewise.
OK with those changes.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list