1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

Cleanup based on reports from Michael Bloom

This commit is contained in:
Mark Pizzolato
2012-03-22 12:20:00 -07:00
parent 3049f16af2
commit 0270d0ea0d
7 changed files with 31 additions and 42 deletions

View File

@@ -1024,12 +1024,12 @@ t_stat sim_disk_detach (UNIT *uptr)
{
struct disk_context *ctx = (struct disk_context *)uptr->disk_ctx;
int (*close_function)(FILE *f);
FILE *fileref = uptr->fileref;
DEVICE *dptr;
FILE *fileref;
t_bool auto_format;
if (uptr == NULL)
return SCPE_IERR;
fileref = uptr->fileref;
switch (DK_GET_FMT (uptr)) { /* case on format */
case DKUF_F_STD: /* Simh */
close_function = fclose;
@@ -1045,7 +1045,7 @@ if (!(uptr->flags & UNIT_ATTABLE)) /* attachable? */
return SCPE_NOATT;
if (!(uptr->flags & UNIT_ATT)) /* attached? */
return SCPE_OK;
if ((dptr = find_dev_from_unit (uptr)) == NULL)
if (NULL == find_dev_from_unit (uptr))
return SCPE_OK;
auto_format = ctx->auto_format;