From 0947a69a9e1081336dd11668d7e9f41f5008ee5a Mon Sep 17 00:00:00 2001 From: Bill Beech Date: Mon, 20 Mar 2017 13:41:24 -0700 Subject: [PATCH] isys80xx, imds-225: Cleanup Coverity identified issues --- Intel-Systems/common/i8088.c | 8 ++++---- Intel-Systems/common/i8237.c | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Intel-Systems/common/i8088.c b/Intel-Systems/common/i8088.c index c971cba1..e59eb7ed 100644 --- a/Intel-Systems/common/i8088.c +++ b/Intel-Systems/common/i8088.c @@ -4660,8 +4660,8 @@ int32 fprint_sym (FILE *of, int32 addr, uint32 *val, int32 parse_sym (char *cptr, int32 addr, UNIT *uptr, uint32 *val, int32 sw) { - int32 cflag, i = 0, j, r; - char gbuf[CBUFSIZE]; + int32 cflag, i = 0, j, r, fflag = 1; + char gbuf[256]; cflag = (uptr == NULL) || (uptr == &i8088_unit); while (isspace (*cptr)) cptr++; /* absorb spaces */ @@ -4721,9 +4721,9 @@ int32 parse_sym (char *cptr, int32 addr, UNIT *uptr, uint32 *val, int32 sw) /* find opcode in table */ for (j = 0; j < 256; j++) { if (strcmp(gbuf, opcode[j]) == 0) - break; + fflag = 0; } - if (j > 255) /* not found */ + if (fflag) /* not found */ return SCPE_ARG; val[0] = j; /* store opcode */ diff --git a/Intel-Systems/common/i8237.c b/Intel-Systems/common/i8237.c index 5c5f8831..c3c3853e 100644 --- a/Intel-Systems/common/i8237.c +++ b/Intel-Systems/common/i8237.c @@ -379,7 +379,6 @@ DEVICE i8237_dev = { t_stat i8237_svc(UNIT *uptr) { - sim_printf("uptr=%08X\n", uptr); sim_activate (&i8237_unit[uptr->u6], i8237_unit[uptr->u6].wait); return SCPE_OK; }