mirror of
https://github.com/simh/simh.git
synced 2026-02-27 01:00:07 +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)
|
||||
return SCPE_IERR;
|
||||
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);
|
||||
uptr -> capac = HDSK_CAPACITY;
|
||||
|
||||
Reference in New Issue
Block a user