From 7a8d61746df48979f5c659372e3792bd85ebf04a Mon Sep 17 00:00:00 2001 From: Roberto Sancho Villa <32797258+rsanchovilla@users.noreply.github.com> Date: Mon, 7 May 2018 23:30:02 +0200 Subject: [PATCH] I650: Fix Coverity Warning --- I650/i650_cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/I650/i650_cpu.c b/I650/i650_cpu.c index aff850b0..2849ad2d 100644 --- a/I650/i650_cpu.c +++ b/I650/i650_cpu.c @@ -924,7 +924,7 @@ sim_instr(void) break; } // should wait for drum to fetch inst? - if (AR < (int)MEMSIZE) { + if (AR < MEMSIZE) { if ((AR % 50) != DrumAddr) continue; // yes } CpuStepsUsed = 0; // init inst execution @@ -938,7 +938,7 @@ sim_instr(void) WaitForInterlock = 0; } // should wait for drum to fetch data? - if ((bReadData) && (AR >= 0) && (AR < (int)MEMSIZE)) { + if ((bReadData) && (AR < MEMSIZE)) { if ((AR % 50) != DrumAddr) continue; // yes } MachineCycle = 3; // exec instr @@ -946,7 +946,7 @@ sim_instr(void) // should wait for cpu to exec the inst? if (CpuStepsUsed > 0) {CpuStepsUsed--; continue;} // yes // should wait for drum to store data? - if ((bWriteDrum) && (AR >= 0) && (AR < (int)MEMSIZE)) { + if ((bWriteDrum) && (AR < MEMSIZE)) { if ((AR % 50) != DrumAddr) continue; // yes } MachineCycle = 5; // terminate the instr execution