From 7a90211e35841758ff11e79a1633494e2055df88 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 5 May 2018 12:15:19 -0700 Subject: Fix misleading indentation in math.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit math.c: In function ‘numeric’: math.c:267:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentat ion] if ((int) strlen(dispstr) >= MAXDISP) ^~ math.c:270:5: note: ...this statement, but the latter is misleadingly indented a s if it were guarded by the ‘if’ switch (keynum){ ^~~~~~ Signed-off-by: Alan Coopersmith --- math.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/math.c b/math.c index c8ac1a8..436bff2 100644 --- a/math.c +++ b/math.c @@ -267,7 +267,7 @@ numeric(int keynum) if ((int) strlen(dispstr) >= MAXDISP) return; - switch (keynum){ + switch (keynum){ case kONE: st[0] = '1'; break; case kTWO: st[0] = '2'; break; case kTHREE: st[0] = '3'; break; @@ -278,9 +278,9 @@ numeric(int keynum) case kEIGHT: st[0] = '8'; break; case kNINE: st[0] = '9'; break; case kZERO: st[0] = '0'; break; - } - st[1] = '\0'; - strcat(dispstr,st); + } + st[1] = '\0'; + strcat(dispstr,st); DrawDisplay(); if (clrdisp && keynum != kZERO) -- cgit v1.2.3