Commit 7cd4e27e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Pointless variable renamings.

parent 3c3049fa
......@@ -71,13 +71,13 @@ find_installed_route(const unsigned char *prefix, unsigned char plen)
void
flush_route(struct route *route)
{
int n;
int i;
struct source *src;
unsigned oldmetric;
int lost = 0;
n = route - routes;
assert(n >= 0 && n < numroutes);
i = route - routes;
assert(i >= 0 && i < numroutes);
oldmetric = route->metric;
......@@ -90,8 +90,8 @@ flush_route(struct route *route)
src = route->src;
if(n != numroutes - 1)
memcpy(routes + n, routes + numroutes - 1, sizeof(struct route));
if(i != numroutes - 1)
memcpy(routes + i, routes + numroutes - 1, sizeof(struct route));
numroutes--;
VALGRIND_MAKE_MEM_UNDEFINED(routes + numroutes, sizeof(struct route));
......
......@@ -57,15 +57,15 @@ find_xroute(const unsigned char *prefix, unsigned char plen)
void
flush_xroute(struct xroute *xroute)
{
int n;
int i;
n = xroute - xroutes;
assert(n >= 0 && n < numxroutes);
i = xroute - xroutes;
assert(i >= 0 && i < numxroutes);
local_notify_xroute(xroute, LOCAL_FLUSH);
if(n != numxroutes - 1)
memcpy(xroutes + n, xroutes + numxroutes - 1, sizeof(struct xroute));
if(i != numxroutes - 1)
memcpy(xroutes + i, xroutes + numxroutes - 1, sizeof(struct xroute));
numxroutes--;
VALGRIND_MAKE_MEM_UNDEFINED(xroutes + numxroutes, sizeof(struct xroute));
......
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