udhcpc: trivial shrink
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 4 Apr 2010 00:12:03 +0000 (02:12 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 4 Apr 2010 00:12:03 +0000 (02:12 +0200)
function                                             old     new   delta
udhcpc_main                                         2801    2785     -16

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/dhcpc.c

index 53e10d00e9e5200d736d3adf1d09aa2c2b76c1d4..1caf8955918d4f36ffedc73dd48685d975a88fcc 100644 (file)
@@ -909,14 +909,12 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
                client_config.opt_mask[n >> 3] |= 1 << (n & 7);
        }
        while (list_x) {
-               unsigned n;
                char *optstr = llist_pop(&list_x);
                char *colon = strchr(optstr, ':');
-               if (colon)
-                       *colon = '\0';
-               n = udhcp_option_idx(optstr);
                if (colon)
                        *colon = ' ';
+               /* now it looks similar to udhcpd's config file line:
+                * "optname optval", using the common routine: */
                udhcp_str2optset(optstr, &client_config.options);
        }