All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] assorted printf-related patches
@ 2021-05-20 10:05 Rasmus Villemoes
  2021-05-20 10:05 ` [PATCH 1/5] lib/vsprintf.c: make sure vsnprintf() never returns a negative value Rasmus Villemoes
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Rasmus Villemoes @ 2021-05-20 10:05 UTC (permalink / raw)
  To: u-boot

The first patch ensures that vsnprintf() never returns a negative
value. Finding (indirect) callers and having them all handle that
would be a whack-a-mole game for no real gain. Even if the callers
don't directly use the return value, they might rely on vsnprintf()
always producing a nul-terminated string, which is not the case if we
do an early "return -Esomething".

The last fixes a bug I found while looking for impact of %pD returning
a negative value.

The second and fourth reduce the size of vsprintf.o a little.

Rasmus Villemoes (5):
  lib/vsprintf.c: make sure vsnprintf() never returns a negative value
  lib/vsprintf.c: implement printf() in terms of vprintf()
  lib/vsprintf.c: remove stale comment
  lib/vsprintf.c: remove unused ip6_addr_string()
  common/log.c: use vscnprintf() in log_dispatch()

 common/log.c   |  2 +-
 lib/vsprintf.c | 28 ++++++----------------------
 2 files changed, 7 insertions(+), 23 deletions(-)

-- 
2.29.2

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-06-19 17:32 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 10:05 [PATCH 0/5] assorted printf-related patches Rasmus Villemoes
2021-05-20 10:05 ` [PATCH 1/5] lib/vsprintf.c: make sure vsnprintf() never returns a negative value Rasmus Villemoes
2021-05-20 17:51   ` Simon Glass
2021-05-21 12:53     ` Rasmus Villemoes
2021-05-21 14:15       ` Heinrich Schuchardt
2021-05-21 14:27         ` Tom Rini
2021-05-21 14:42           ` Heinrich Schuchardt
2021-05-27 23:01             ` Rasmus Villemoes
2021-06-19 17:32               ` Simon Glass
2021-05-21 14:40         ` Rasmus Villemoes
2021-05-21 15:43           ` Heinrich Schuchardt
2021-05-21 14:48         ` Sean Anderson
2021-05-20 10:05 ` [PATCH 2/5] lib/vsprintf.c: implement printf() in terms of vprintf() Rasmus Villemoes
2021-05-20 17:51   ` Simon Glass
2021-05-20 10:05 ` [PATCH 3/5] lib/vsprintf.c: remove stale comment Rasmus Villemoes
2021-05-20 17:51   ` Simon Glass
2021-05-21 14:22   ` Heinrich Schuchardt
2021-05-20 10:05 ` [PATCH 4/5] lib/vsprintf.c: remove unused ip6_addr_string() Rasmus Villemoes
2021-05-20 17:51   ` Simon Glass
2021-05-21 14:32   ` Heinrich Schuchardt
2021-05-20 10:05 ` [PATCH 5/5] common/log.c: use vscnprintf() in log_dispatch() Rasmus Villemoes
2021-05-20 17:51   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.