Dear Heinrich,

In message <a6b8e055-5c8a-7a95-8959-1bd6958a1...@gmx.de> you wrote:
> 
> %ps replaces illegal code points by question marks.
> If we would follow Wolfgang's reasoning we should create an error for
> sprintf("%ps\n", ptr) if ptr contains an unconvertible code.

You misinterpret me.  the behaviour / output of *printf() for
incorrect arguments etc. depends on the specification of the API.
It may result in special output (like "<NULL>" for a null pointer
reference).

But we should always return an error for unrecoverable error
situations that prevented proper operation accourding to the spec,
like out-of-memory situations.

> Does this imply:
> 
> as none of the current conversion functions in lib/vsprintf.c is 
> creating an error value we only have to care about future callers 
> printing device paths?

No.  Whener we run into bugs or bad code, we should fix it.  Ot at
least flag it, so it can be fixed later.

We shall never, never ever paper over known issues.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Madness takes its toll. Please have exact change.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to