ifplugd: small optimization

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-11-07 17:30:14 +01:00
parent 6eaac025a1
commit 5a34d021cb

View File

@ -628,6 +628,7 @@ int ifplugd_main(int argc UNUSED_PARAM, char **argv)
opts = getopt32(argv, OPTION_STR, opts = getopt32(argv, OPTION_STR,
&G.iface, &G.script_name, &G.poll_time, &G.delay_up, &G.iface, &G.script_name, &G.poll_time, &G.delay_up,
&G.delay_down, &G.api_mode, &G.extra_arg); &G.delay_down, &G.api_mode, &G.extra_arg);
G.poll_time *= 1000;
applet_name = xasprintf("ifplugd(%s)", G.iface); applet_name = xasprintf("ifplugd(%s)", G.iface);
@ -752,7 +753,7 @@ int ifplugd_main(int argc UNUSED_PARAM, char **argv)
if (poll(netlink_pollfd, if (poll(netlink_pollfd,
(opts & FLAG_MONITOR) ? 1 : 0, (opts & FLAG_MONITOR) ? 1 : 0,
G.poll_time * 1000 G.poll_time
) < 0 ) < 0
) { ) {
if (errno == EINTR) if (errno == EINTR)