Commit Graph

6 Commits

Author SHA1 Message Date
Thomas Huth 9604efb183 Fix typos in the remaining lib folders
Found with the "codespell" utility.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2023-02-28 16:12:57 +11:00
Alexey Kardashevskiy 0549fa7d08 libc: Compile with -Wextra
-Wextra enables a bunch of rather useful checks which this fixes.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* replaced cast to int with cast to size_t
2021-02-09 12:39:52 +11:00
Thomas Huth 16661f937c libc: Add the snprintf() function
Code has been taken from the sprintf() function (which is almost the same,
except that snprintf calls vsnprintf instead of vsprintf internally).

Signed-off-by: Thomas Huth <thuth@redhat.com>
[aik: fixed traling spaces]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2018-05-29 19:06:14 +10:00
Thomas Huth 1f0600f25d libc: The arguments of puts() can be marked as "const"
puts() does not change the string, so the parameter can be "const".

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2017-06-08 16:09:07 +10:00
Alexey Kardashevskiy da3bd7a2c7 libc: Port vsnprintf back from skiboot
Since initial port from slof to skiboot, vsnprintf() has improved in
skiboot so let's port the improved version back.

Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-12-02 14:23:25 +11:00
Benjamin Herrenschmidt aaad509cdc Initial import of slof-JX-1.7.0-4
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-12-01 09:51:44 +11:00