Commit c7b44dac by Juliusz Chroboczek

Make flush_interface return a value.

1 parent c4438c80
......@@ -95,7 +95,7 @@ add_interface(char *ifname, struct interface_conf *if_conf)
return ifp;
}
void
int
flush_interface(char *ifname)
{
struct interface *ifp, *prev;
......@@ -109,10 +109,9 @@ flush_interface(char *ifname)
ifp = ifp->next;
}
if(ifp == NULL) {
fprintf(stderr, "Warning: attempting to flush nonexistent interface.\n");
return;
}
if(ifp == NULL)
return 0;
interface_up(ifp, 0);
if(prev)
prev->next = ifp->next;
......@@ -127,6 +126,8 @@ flush_interface(char *ifname)
local_notify_interface(ifp, LOCAL_FLUSH);
free(ifp);
return 1;
}
/* This should be no more than half the hello interval, so that hellos
......
......@@ -123,7 +123,7 @@ if_up(struct interface *ifp)
}
struct interface *add_interface(char *ifname, struct interface_conf *if_conf);
void flush_interface(char *ifname);
int flush_interface(char *ifname);
unsigned jitter(struct interface *ifp, int urgent);
unsigned update_jitter(struct interface *ifp, int urgent);
void set_timeout(struct timeval *timeout, int msecs);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!