From 22bcce2e2fd9377079f8464bfdd14a8e23ee7a1d Mon Sep 17 00:00:00 2001 From: Luciano Martin Date: Mon, 11 Dec 2017 13:50:41 +0000 Subject: [PATCH] - fixed a bug and renamed generic iteration counter i as tileNum --- lib_xua/src/core/support/reboot.xc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib_xua/src/core/support/reboot.xc b/lib_xua/src/core/support/reboot.xc index 7743bfae..a25fcbf3 100644 --- a/lib_xua/src/core/support/reboot.xc +++ b/lib_xua/src/core/support/reboot.xc @@ -60,9 +60,9 @@ void device_reboot_aux(void) #ifdef __XS2A__ /* Find tile number of the local tile ID*/ - for(int i = 0; i=0; i--) + for(int tileNum = tileArrayLength-1; tileNum>=0; tileNum--) #else /* Reset all even tiles, starting from the remote ones */ - for(int i = tileArrayLength-2; i>=0; i=i-2) + for(int tileNum = tileArrayLength-2; tileNum>=0; tileNum=tileNum-2) #endif { /* Cannot cast tileref to unsigned! */ - tileId = get_tile_id(tile[i]); + tileId = get_tile_id(tile[tileNum]); /* Do not reboot local tile yet! */ #ifndef __XS2A__ if(localTileId != tileId) #else /* In XS2A the tile paired up with the local tile can't be rebooted either */ - if((localTileNum&0xFFFE) != (tileId&0xFFFE)) + if((localTileNum|0x01) != (tileNum|0x01)) #endif { reset_tile(tileId);