From 4a739efc77f8f71b2acdfbcac42a22050d52fd13 Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Wed, 19 Jan 2022 23:07:48 -0500 Subject: [PATCH] KA10: Removed some coverity errors. --- PDP10/ks10_lp.c | 2 +- PDP10/ks10_uba.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PDP10/ks10_lp.c b/PDP10/ks10_lp.c index 507314e..2037ded 100644 --- a/PDP10/ks10_lp.c +++ b/PDP10/ks10_lp.c @@ -460,7 +460,7 @@ lp20_printline(UNIT *uptr, int nl) { int trim = 0; /* Trim off trailing blanks */ - while (lp20_col >= 0 && lp20_buffer[lp20_col - 1] == ' ') { + while (lp20_col != 0 && lp20_buffer[lp20_col - 1] == ' ') { lp20_col--; trim = 1; } diff --git a/PDP10/ks10_uba.c b/PDP10/ks10_uba.c index a1d071b..00f8394 100644 --- a/PDP10/ks10_uba.c +++ b/PDP10/ks10_uba.c @@ -383,9 +383,9 @@ uba_clr_irq(DIB *idev) if (dibp->uba_ctl == idev->uba_ctl && dibp->uba_irq_pend != 0) { lvl = 0; - for (j = 0200; j != 0; j>>=2) { + for (j = 0200; j != 0; j>>=1) { /* At least one, no need to continue */ - if ((dibp->uba_irq_pend & (0200 >> j)) != 0) { + if ((dibp->uba_irq_pend & j) != 0) { set_interrupt(dibp->uba_ctl<<2, pi); return; }