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