B5500: Fixed Coverity bugs.
This commit is contained in:
parent
df1baf2528
commit
485114cae3
2 changed files with 7 additions and 3 deletions
|
@ -3981,11 +3981,11 @@ cpu_show_hist(FILE * st, UNIT * uptr, int32 val, CONST void *desc)
|
|||
int i;
|
||||
fprintf(st, "%o %05o%o ", h->cpu, h->c & 077777, h->l);
|
||||
sim_eval = (t_value)h->a_reg;
|
||||
fprint_sym(st, 0, &sim_eval, &cpu_unit[0], SWMASK('B'));
|
||||
(void)fprint_sym(st, 0, &sim_eval, &cpu_unit[0], SWMASK('B'));
|
||||
fputc((h->flags & F_AROF) ? '^': ' ', st);
|
||||
fputc(' ', st);
|
||||
sim_eval = (t_value)h->b_reg;
|
||||
fprint_sym(st, 0, &sim_eval, &cpu_unit[0], SWMASK('B'));
|
||||
(void)fprint_sym(st, 0, &sim_eval, &cpu_unit[0], SWMASK('B'));
|
||||
fputc((h->flags & F_BROF) ? '^': ' ', st);
|
||||
fputc(' ', st);
|
||||
fprint_val(st, (t_value)h->x_reg, 8, 39, PV_RZRO);
|
||||
|
|
|
@ -363,10 +363,14 @@ t_stat dtc_srv(UNIT * uptr)
|
|||
switch(i) {
|
||||
case BufNotReady:
|
||||
chan_set_notrdy(chan);
|
||||
/* Fall through */
|
||||
case BufInputBusy:
|
||||
/* Fall through */
|
||||
case BufRead:
|
||||
/* Fall through */
|
||||
case BufReadRdy:
|
||||
chan_set_error(chan);
|
||||
/* Fall through */
|
||||
case BufOutBusy:
|
||||
chan_set_eof(chan);
|
||||
chan_set_end(chan);
|
||||
|
@ -782,7 +786,7 @@ t_stat dtc_setnl (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
|||
newln = (int32) get_uint (cptr, 10, DTC_MLINES, &r);
|
||||
if ((r != SCPE_OK) || (newln == dtc_desc.lines))
|
||||
return r;
|
||||
if ((newln == 0) || (newln > DTC_MLINES))
|
||||
if ((newln == 0) || (newln >= DTC_MLINES))
|
||||
return SCPE_ARG;
|
||||
newln--;
|
||||
if (newln < dtc_desc.lines) {
|
||||
|
|
Loading…
Add table
Reference in a new issue