AltairZ80: Improved diskClose error handling (Coverity Scan)
This commit is contained in:
parent
e7a38cc56f
commit
9f746cfefa
1 changed files with 4 additions and 1 deletions
|
@ -528,7 +528,10 @@ static t_stat hdsk_detach(UNIT *uptr) {
|
||||||
if (unitIndex == -1)
|
if (unitIndex == -1)
|
||||||
return SCPE_IERR;
|
return SCPE_IERR;
|
||||||
assert((0 <= unitIndex) && (unitIndex < HDSK_NUMBER));
|
assert((0 <= unitIndex) && (unitIndex < HDSK_NUMBER));
|
||||||
diskClose(&hdsk_imd[unitIndex]);
|
result = diskClose(&hdsk_imd[unitIndex]);
|
||||||
|
if (result != SCPE_OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
result = detach_unit(uptr);
|
result = detach_unit(uptr);
|
||||||
uptr -> capac = HDSK_CAPACITY;
|
uptr -> capac = HDSK_CAPACITY;
|
||||||
|
|
Loading…
Add table
Reference in a new issue