> -----Original Message-----
> From: Tito [mailto:[email protected]] 
> Sent: 19 June 2016 16:25
> To: [email protected]
> Subject: Re: [Patch] ps: add support for real-time format specifiers

<SNIP>

> Hi,
> why do we need 3 different functions here? Couldn't something like this do it?
> 
> static void sprint_it(char *buf, int size, unsigned int value) {
>       sprintf(buf, "%*u", size, value);
> }
>
> This could eventually also reduce size of the binary.
> Untested just a hint.
> 
> Ciao,
> Tito

We need the individual functions because the out_spec[] table uses it to decode 
the option. I can't see how to reduce the binary size without a major rewrite.

Cheers,
Stephen.

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to