[PATCH 1/4] dhcp6c: decode_base64()

Leonid Lisovskiy lly.dev at gmail.com
Tue Oct 18 06:57:06 UTC 2011


On Tue, Oct 18, 2011 at 2:32 AM, Denys Vlasenko
<vda.linux at googlemail.com> wrote:
> On Saturday 01 October 2011 18:02, Leonid Lisovskiy wrote:
>> This patch adds into libbb decode_base64() function to decode base64
>> string. Needs for DHCPv6 authorization keys decode.
>
> Cut-and-paste programming - you just copied read_base64()
> and tweaked the part where it gets next byte.

I know :(

> Busybox is about minimizing size, therefore code duplication
> isn't a good idea.

I'm absolutely agree, but another way to share code, requires two
callback functions returning next char/putting next char. Is it
acceptable? Can you advice more pretty & compact solution?


Leonid


More information about the busybox mailing list