Skip to content

Commit 1bfafb3

Browse files
committed
Remove unused variable from CTP
1 parent 6cc79b6 commit 1bfafb3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tos/lib/net/ctp/CtpRoutingEngineP.nc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ implementation {
159159
uint8_t routingTableActive;
160160

161161
/* statistics */
162-
uint32_t parentChanges;
162+
//uint32_t parentChanges;
163163
/* end statistics */
164164

165165
// forward declarations
@@ -213,7 +213,7 @@ implementation {
213213
command error_t Init.init() {
214214
radioOn = FALSE;
215215
running = FALSE;
216-
parentChanges = 0;
216+
//parentChanges = 0;
217217
state_is_root = 0;
218218
routeInfoInit(&routeInfo);
219219
routingTableInit();
@@ -348,7 +348,7 @@ implementation {
348348
// since the linkMetric may change, we will compose whenever
349349
// we need it: i. when choosing a parent (here);
350350
// ii. when choosing a next hop
351-
parentChanges++;
351+
//parentChanges++;
352352

353353
dbg("TreeRouting","Changed parent. from %d to %d\n", routeInfo.parent, best->neighbor);
354354
call CollectionDebug.logEventDbg(NET_C_TREE_NEW_PARENT, best->neighbor, best->info.etx, minEtx);
@@ -368,17 +368,19 @@ implementation {
368368
/* Finally, tell people what happened: */
369369
/* We can only loose a route to a parent if it has been evicted. If it hasn't
370370
* been just evicted then we already did not have a route */
371-
if (justEvicted && routeInfo.parent == INVALID_ADDR)
371+
if (justEvicted && routeInfo.parent == INVALID_ADDR) {
372372
signal Routing.noRoute();
373+
}
373374
/* On the other hand, if we didn't have a parent (no currentEtx) and now we
374375
* do, then we signal route found. The exception is if we just evicted the
375376
* parent and immediately found a replacement route: we don't signal in this
376377
* case */
377378
else if (!justEvicted &&
378379
currentEtx == MAX_METRIC &&
379-
minEtx != MAX_METRIC)
380+
minEtx != MAX_METRIC) {
380381
signal Routing.routeFound();
381-
justEvicted = FALSE;
382+
}
383+
justEvicted = FALSE;
382384
}
383385

384386

0 commit comments

Comments
 (0)