[PATCH 5/5] common/log.c: use vscnprintf() in log_dispatch()

Simon Glass sjg at chromium.org
Thu May 20 19:51:46 CEST 2021


On Thu, 20 May 2021 at 04:05, Rasmus Villemoes
<rasmus.villemoes at prevas.dk> wrote:
>
> We have to use the *printf variant which returns the strlen() of the
> resulting string, not the
> how-much-would-have-been-printed-given-enough-space, in order to use
> that value to inspect the last character in the string.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
>  common/log.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

But I think it should check for a -ve value too.


More information about the U-Boot mailing list