swtp6800: Solve Coverity identified issues
This commit is contained in:
parent
c389573c91
commit
625d1b391e
2 changed files with 11 additions and 3 deletions
|
@ -398,7 +398,11 @@ int32 fdcdrv(int32 io, int32 data)
|
||||||
sim_printf("\nfdccmd: File error\n");
|
sim_printf("\nfdccmd: File error\n");
|
||||||
return SCPE_IOERR;
|
return SCPE_IOERR;
|
||||||
}
|
}
|
||||||
sim_fread(dsk_unit[cur_dsk].filebuf, SECSIZ, 1, dsk_unit[cur_dsk].fileref); /* read in buffer */
|
err = sim_fread(dsk_unit[cur_dsk].filebuf, SECSIZ, 1, dsk_unit[cur_dsk].fileref); /* read in buffer */
|
||||||
|
if (err) {
|
||||||
|
sim_printf("\nfdccmd: File error\n");
|
||||||
|
return SCPE_IOERR;
|
||||||
|
}
|
||||||
dsk_unit[cur_dsk].u3 |= BUSY | DRQ; /* set DRQ & BUSY */
|
dsk_unit[cur_dsk].u3 |= BUSY | DRQ; /* set DRQ & BUSY */
|
||||||
dsk_unit[cur_dsk].pos = 0; /* clear counter */
|
dsk_unit[cur_dsk].pos = 0; /* clear counter */
|
||||||
spt = *((uint8 *)(dsk_unit[cur_dsk].filebuf) + MAXSEC) & 0xFF;
|
spt = *((uint8 *)(dsk_unit[cur_dsk].filebuf) + MAXSEC) & 0xFF;
|
||||||
|
@ -445,7 +449,11 @@ int32 fdccmd(int32 io, int32 data)
|
||||||
sim_printf("\nfdccmd: File error\n");
|
sim_printf("\nfdccmd: File error\n");
|
||||||
return SCPE_IOERR;
|
return SCPE_IOERR;
|
||||||
}
|
}
|
||||||
sim_fread(dsk_unit[cur_dsk].filebuf, SECSIZ, 1, dsk_unit[cur_dsk].fileref); /* read in buffer */
|
err = sim_fread(dsk_unit[cur_dsk].filebuf, SECSIZ, 1, dsk_unit[cur_dsk].fileref); /* read in buffer */
|
||||||
|
if (err) {
|
||||||
|
sim_printf("\nfdccmd: File error\n");
|
||||||
|
return SCPE_IOERR;
|
||||||
|
}
|
||||||
dsk_unit[cur_dsk].u3 |= BUSY | DRQ; /* set DRQ & BUSY */
|
dsk_unit[cur_dsk].u3 |= BUSY | DRQ; /* set DRQ & BUSY */
|
||||||
dsk_unit[cur_dsk].pos = 0; /* clear counter */
|
dsk_unit[cur_dsk].pos = 0; /* clear counter */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -173,7 +173,7 @@ int32 get_base(void)
|
||||||
|
|
||||||
int32 CPU_BD_get_mbyte(int32 addr)
|
int32 CPU_BD_get_mbyte(int32 addr)
|
||||||
{
|
{
|
||||||
int32 val;
|
int32 val = 0;
|
||||||
|
|
||||||
sim_debug (DEBUG_read, &CPU_BD_dev, "CPU_BD_get_mbyte: addr=%04X\n", addr);
|
sim_debug (DEBUG_read, &CPU_BD_dev, "CPU_BD_get_mbyte: addr=%04X\n", addr);
|
||||||
switch(addr & 0xF000) {
|
switch(addr & 0xF000) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue