> -       *(uint32_t*)arg = lsa->u.sin.sin_addr.s_addr;
> +       memcpy(arg, &lsa->u.sin.sin_addr.s_addr, sizeof(uint32_t)); /* *arg 
> maybe unaligned */

We have move_to_unaligned32().

> -               case OPTION_BIN: /* handled in attach_option() */
> +               case OPTION_BIN: { /* handled in attach_option() */
>                        opt = val;
>                        retval = 1;
> +                       break;
> +               }

There was no need to touch this block.

> +               case OPTION_STATIC_ROUTES: {
> +                       char *bits;
> +
> +                       /* expect a.b.c.d/m format */
> +                       bits = strchr(val, '/');
> +                       if(!bits) {
> +                               retval = 0;

Redundant, retval is already 0 here.

> +                       } else {
> +                               *bits = '\0';
> +                               buffer[0] = strtoul(bits + 1, NULL, 0);
> +                               retval = udhcp_str2nip(val, buffer + 1);
> +                               val = strtok(NULL, ", \t/-");
> +                               if (!val || (unsigned char)buffer[0] > 32)
> +                                       retval = 0;
> +
> +                               if (retval) {
> +                                       length = ((buffer[0] + 7) >> 3) + 5;
> +                                       retval = udhcp_str2nip(val, buffer + 
> (length - 4));
> +                                       opt = buffer;

Redundant, opt = buffer already.


Committed with small changes:

http://git.busybox.net/busybox/commit/?id=7b57ff4436f3e672076e6f5440954a958ba04ab3

Please test current git...

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

Reply via email to