diff options
author | Sam Nelson <sam.nelson@ti.com> | 2019-10-08 23:21:21 -0400 |
---|---|---|
committer | Sam Nelson <sam.nelson@ti.com> | 2019-10-09 10:26:16 -0400 |
commit | 46559a4e91c0cc8e5b2eb91cac8930bcb3f503ff (patch) | |
tree | e3d73b3ec8d86d8087dff161c8fc9304376606b9 | |
parent | 23a6f768554e0b5bb97a14ef92fb4cc25331b9f5 (diff) | |
download | ipc-46559a4e91c0cc8e5b2eb91cac8930bcb3f503ff.tar.gz |
SysMin: Fix double usage of variable i
Renamed local usage inside loop
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
-rw-r--r-- | packages/ti/trace/SysMin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/ti/trace/SysMin.c b/packages/ti/trace/SysMin.c index 89ab263..a79a387 100644 --- a/packages/ti/trace/SysMin.c +++ b/packages/ti/trace/SysMin.c @@ -127,7 +127,7 @@ Void SysMin_putch(Char ch) #endif UInt lineIdx; Char *lineBuf; - Int index; + UInt index; UInt64 uSec; static Bool configure = FALSE; static UInt startIdx; @@ -145,19 +145,19 @@ Void SysMin_putch(Char ch) /* Configure the trace timestamp format */ if (!configure) { - Int i = 0, mod = 10; + Int iLocal = 0, mod = 10; /* Find number of characters needes for seconds and sub-seconds, * tick periods are specified in microseconds */ - for (; i < maxuSecCharLen; i++) { + for (; iLocal < (Int)maxuSecCharLen; i++) { if (Clock_tickPeriod % mod) { break; } mod = mod * 10; } - timeStampSecCharLen = minSecCharLen + i; + timeStampSecCharLen = minSecCharLen + iLocal; startIdx = decPtIdx - timeStampSecCharLen; - endIdx = timeStampBufLen - (i + 1); /* Account for null character too */ + endIdx = timeStampBufLen - (iLocal + 1); /* Account for null character too */ configure = TRUE; } |