mirror of
https://github.com/open-simh/simh.git
synced 2026-05-03 14:49:02 +00:00
AltairZ80: Improved diskClose error handling (Coverity Scan)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user