Nameif broken

sddnd sddndw at gmail.com
Wed Apr 23 21:39:54 UTC 2008


On Thu, Apr 10, 2008 at 10:03 AM, Denys Vlasenko <vda.linux at googlemail.com>
wrote:
>
> On Wednesday 09 April 2008 22:05, Nico Erfurth wrote:
> > Hi,
> >
> > some months ago I've send a patch to extend the matching capabilities of
> > nameif. The patch was modified (in fact broken ;]) and applied.
> >
> > While testing the latest releases i've found that nameif does not work
> > at all anymore, as the /proc/net/dev parsing code and some other things
> > were broken.
> >
> > Appended is a patch to fix nameif, I've also extended the cleanup-code
> > to match the new data structure and did some minor code shrinks.
>
> -               *skip_non_whitespace(line_ptr) = '\0';
> +               *strpbrk(line_ptr, " \t\n:") = '\0';
>

Denys:

gcc-4.3.0 refuses to compile this.
use:

    *(char *)strpbrk(line_ptr, " \t\n:") = '\0';

is ok.

ps. gcc verion 4.3.0 20080111

>
> Why ':' is considered a terminator too? (I want to add a comment there).
>
> Applied. Thanks.
>
> --
> vda
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20080424/eee14f31/attachment-0002.htm 


More information about the busybox mailing list