Commit 72480049 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Flush parse_ifflags.

This saves 512 bytes of BSS.
parent d1c82a6e
......@@ -1044,8 +1044,8 @@ filter_link(struct nlmsghdr *nh, void *data)
ifname = parse_ifname_rta(info, len);
if(ifname == NULL)
return 0;
kdebugf("filter_interfaces: link change on if %s(%d): %s\n",
ifname, ifindex, parse_ifflags(ifflags));
kdebugf("filter_interfaces: link change on if %s(%d): 0x%x\n",
ifname, ifindex, (unsigned)ifflags);
FOR_ALL_NETS(net) {
if (strcmp(net->ifname, ifname) == 0)
return 1;
......
......@@ -387,22 +387,6 @@ v4tov6(unsigned char *dst, const unsigned char *src)
memcpy(dst + 12, src, 4);
}
char *
parse_ifflags(unsigned int flags)
{
static char buf[512];
buf[0] = '\0';
if (flags & IFF_UP)
strcat(buf, "UP ");
if (flags & IFF_BROADCAST)
strcat(buf, "BROADCAST ");
if (flags & IFF_RUNNING)
strcat(buf, "RUNNING ");
if (flags & IFF_MULTICAST)
strcat(buf, "MULTICAST ");
return buf;
}
int
daemonise()
{
......
......@@ -54,7 +54,6 @@ int wait_for_fd(int direction, int fd, int msecs);
int martian_prefix(const unsigned char *prefix, int plen) ATTRIBUTE ((pure));
int v4mapped(const unsigned char *address) ATTRIBUTE ((pure));
void v4tov6(unsigned char *dst, const unsigned char *src);
char *parse_ifflags(unsigned int flags);
int daemonise(void);
/* If debugging is disabled, we want to avoid calling format_address
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment