diff --git a/sim_disk.c b/sim_disk.c index b8374a3c..ae8f61da 100644 --- a/sim_disk.c +++ b/sim_disk.c @@ -1732,8 +1732,8 @@ if (capac && (capac != (t_offset)-1)) { if ((filesystem_capac != (t_offset)-1) && /* Known file system data size AND */ (filesystem_capac > capac)) /* Data size greater than container size? */ capac = filesystem_capac; /* Use file system data size */ - if ((filesystem_capac != (t_offset)-1) && /* Known file system data size AND */ - (capac > (((t_offset)uptr->capac)*ctx->capac_factor*((dptr->flags & DEV_SECTORS) ? 512 : 1))) || /* Data > current size */ + if (((filesystem_capac != (t_offset)-1) && /* Known file system data size AND */ + (capac > (((t_offset)uptr->capac)*ctx->capac_factor*((dptr->flags & DEV_SECTORS) ? 512 : 1)))) || /* Data > current size */ (DKUF_F_STD != DK_GET_FMT (uptr))) /* OR ! autosizeable disk */ uptr->capac = (t_addr)(capac/(ctx->capac_factor*((dptr->flags & DEV_SECTORS) ? 512 : 1))); /* update current size */ } diff --git a/sim_tmxr.c b/sim_tmxr.c index 46798bda..b93bf267 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -713,11 +713,12 @@ if (lp->serport) { /* serial port connectio else { /* Telnet connection */ written = sim_write_sock (lp->sock, &(lp->txb[i]), length); - if (written == SOCKET_ERROR) /* did an error occur? */ + if (written == SOCKET_ERROR) { /* did an error occur? */ if (lp->datagram) return written; /* ignore errors on datagram sockets */ else return -1; /* return error indication */ + } } if ((written > 0) && (lp->txbps) && (sim_is_running)) lp->txnexttime = floor (sim_gtime () + ((written * lp->txdelta * sim_timer_inst_per_sec ()) / TMXR_RX_BPS_UNIT_SCALE));