summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Aulery <lkppo@free.fr>2013-07-07 22:50:30 +0200
committerAlan Coopersmith <alan.coopersmith@oracle.com>2019-01-06 14:41:43 -0800
commit85c9feb6e10cea1ef017d702151b14717c40b9d5 (patch)
tree9a11b27d9a278986084e0c389385d1ebb8c922d6
parentaa3d39389bfc752486a83933574d0365c74d4e29 (diff)
Reduce scope of i (cppcheck --verbose --enable=all)
Signed-off-by: Stéphane Aulery <lkppo@free.fr> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--math.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/math.c b/math.c
index e74cca6..ff2db17 100644
--- a/math.c
+++ b/math.c
@@ -761,13 +761,12 @@ void
offf(void)
{
/* full reset */
- int i;
ResetCalc();
entered=clrdisp=1;
lift_enabled = 0;
dnum=mem[0]=0.0;
if (rpn)
- for (i=1; i < XCALC_MEMORY; i++)
+ for (int i=1; i < XCALC_MEMORY; i++)
mem[i]=0.0;
exponent=Dpoint=0;
DrawDisplay();