[Ltrace-devel] patch : disable broken printf length

Petr Machata pmachata at gmail.com
Fri Nov 13 12:44:36 UTC 2015


BTW, I dropped the Debian bugbot from CC.

Mike  Dupont <jamesmikedupont at googlemail.com> writes:

> @@ -207,8 +202,8 @@ param_printf_next(struct param_enum *sel
>              continue;
>
>          case '*':
> -            /* Length parameter given in the next
> -             * argument.  */
> +            /* Min or max Length parameter given in the next
> +             * argument depending on position.  */

I don't understand the intention behind this commentary change.
(Also, s/Length/length/.)

>              if (self->future_length == NULL)
>                  /* This should really be an assert,
>                   * but we can't just fail on invalid
> @@ -229,8 +224,6 @@ param_printf_next(struct param_enum *sel
>              /* Field length likewise, but we need to parse
>               * this to attach the appropriate string
>               * length expression.  */
> -            if (len_buf_len < sizeof(len_buf) - 1)
> -                len_buf[len_buf_len++] = *self->ptr;

The comment is not accurate anymore.  I think you can move all the
numeric cases up in the switch alongside the '#', ' ' etc.

Looks good otherwise.

Thanks,
Petr



More information about the Ltrace-devel mailing list