* [PATCH] xfuncs: fix format specifier in pr_emerg call
@ 2017-05-17 12:02 Ian Abbott
2017-05-17 13:53 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ian Abbott @ 2017-05-17 12:02 UTC (permalink / raw)
To: barebox; +Cc: Ian Abbott
`enomem_panic()` calls `pr_emerg()` using `%d` in the format specifier
string to print a value of type `size_t`. Change it to `%zu`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
lib/xfuncs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/xfuncs.c b/lib/xfuncs.c
index 1bcaa5e10..1942c1e7f 100644
--- a/lib/xfuncs.c
+++ b/lib/xfuncs.c
@@ -29,7 +29,7 @@ static void __noreturn enomem_panic(size_t size)
{
pr_emerg("out of memory\n");
if (size)
- pr_emerg("Unable to allocate %d bytes\n", size);
+ pr_emerg("Unable to allocate %zu bytes\n", size);
malloc_stats();
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] xfuncs: fix format specifier in pr_emerg call
2017-05-17 12:02 [PATCH] xfuncs: fix format specifier in pr_emerg call Ian Abbott
@ 2017-05-17 13:53 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-05-17 13:53 UTC (permalink / raw)
To: Ian Abbott; +Cc: barebox
On Wed, May 17, 2017 at 01:02:24PM +0100, Ian Abbott wrote:
> `enomem_panic()` calls `pr_emerg()` using `%d` in the format specifier
> string to print a value of type `size_t`. Change it to `%zu`.
>
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
> lib/xfuncs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
>
> diff --git a/lib/xfuncs.c b/lib/xfuncs.c
> index 1bcaa5e10..1942c1e7f 100644
> --- a/lib/xfuncs.c
> +++ b/lib/xfuncs.c
> @@ -29,7 +29,7 @@ static void __noreturn enomem_panic(size_t size)
> {
> pr_emerg("out of memory\n");
> if (size)
> - pr_emerg("Unable to allocate %d bytes\n", size);
> + pr_emerg("Unable to allocate %zu bytes\n", size);
>
> malloc_stats();
>
> --
> 2.11.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-17 13:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 12:02 [PATCH] xfuncs: fix format specifier in pr_emerg call Ian Abbott
2017-05-17 13:53 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox