diff options
author | 2021-10-05 03:34:45 +1100 | |
---|---|---|
committer | 2021-10-05 03:34:45 +1100 | |
commit | aeb9eae87469e67bc6a91caf3840c34c11d959fc (patch) | |
tree | 45bffedf374dbce47caca633ad7bda547592e6c9 /src/mame/machine/coco_vhd.cpp | |
parent | 33723892a3f06e678d817b36aef84364c32848ec (diff) |
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.
Diffstat (limited to 'src/mame/machine/coco_vhd.cpp')
-rw-r--r-- | src/mame/machine/coco_vhd.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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; |