From aeb9eae87469e67bc6a91caf3840c34c11d959fc Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 5 Oct 2021 03:34:45 +1100 Subject: util: Further API cleanups: (#8661) * Turned `core_file` into an implementation of `random_read_write`. * Turned PNG errors into a standard error category. * Added a helper for generating what look like derived classes on-the-fly. --- src/mame/machine/coco_vhd.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/mame') diff --git a/src/mame/machine/coco_vhd.cpp b/src/mame/machine/coco_vhd.cpp index 407d8b506d5..29368003056 100644 --- a/src/mame/machine/coco_vhd.cpp +++ b/src/mame/machine/coco_vhd.cpp @@ -135,10 +135,9 @@ void coco_vhd_image_device::coco_vhd_readwrite(uint8_t data) } /* perform the seek */ - seek_position = ((uint64_t) 256) * m_logical_record_number; + seek_position = uint64_t(256) * m_logical_record_number; total_size = length(); - result = fseek(std::min(seek_position, total_size), SEEK_SET); - if (result < 0) + if (fseek(std::min(seek_position, total_size), SEEK_SET)) { m_status = VHDSTATUS_ACCESS_DENIED; return; -- cgit v1.2.3