[BusyBox] Re: [BusyBox-cvs] busybox/editors sed.c,1.167,1.168

Glenn McGrath bug1 at iinet.net.au
Sun May 16 00:38:27 UTC 2004


On Sat, 15 May 2004 19:48:26 +0200
Bastian Blank <waldi at debian.org> wrote:

> This patch is broken.
> - The return value of main is int and EXIT_SUCCESS/_FAILURE are int
>   constants, it is not defined if they are convertable into char.
> - char access is horrible expensive on many arches, either runtime or
>   code size, use bool if you want such.

I think the type used should try to minimise the number of casts done,
other than that it should use the minimum integer suitable for the task.

So, i agree that status should also be int, but think getpat is fine as
a char, or perhaps uint8_t would be more transparent.

Where does this "bool" come from, isnt that only a c++ thing ?


Glenn



More information about the busybox mailing list