summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/pckeybrd.c
diff options
context:
space:
mode:
author Oliver Stöneberg <firewave@users.noreply.github.com>2014-04-03 22:48:35 +0000
committer Oliver Stöneberg <firewave@users.noreply.github.com>2014-04-03 22:48:35 +0000
commitf2de945ef9d9665a418f10a813fe01516c44c5b5 (patch)
tree0950985f78cbdfc970d908812671776b85bf3579 /src/emu/machine/pckeybrd.c
parent9b0b211a7968314ab97a430f85a985ac931af3ec (diff)
use ARRAY_LENGTH (nw)
Diffstat (limited to 'src/emu/machine/pckeybrd.c')
-rw-r--r--src/emu/machine/pckeybrd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/machine/pckeybrd.c b/src/emu/machine/pckeybrd.c
index d41e7a12ed3..3801c6a20ff 100644
--- a/src/emu/machine/pckeybrd.c
+++ b/src/emu/machine/pckeybrd.c
@@ -393,7 +393,7 @@ void pc_keyboard_device::queue_insert(UINT8 data)
m_queue[m_head] = data;
m_head++;
- m_head %= (sizeof(m_queue) / sizeof(m_queue[0]));
+ m_head %= ARRAY_LENGTH(m_queue);
}
@@ -402,7 +402,7 @@ int pc_keyboard_device::queue_size(void)
int queue_size;
queue_size = m_head - m_tail;
if (queue_size < 0)
- queue_size += sizeof(m_queue) / sizeof(m_queue[0]);
+ queue_size += ARRAY_LENGTH(m_queue);
return queue_size;
}
@@ -669,7 +669,7 @@ READ8_MEMBER(pc_keyboard_device::read)
logerror("read(): Keyboard Read 0x%02x\n",data);
m_tail++;
- m_tail %= sizeof(m_queue) / sizeof(m_queue[0]);
+ m_tail %= ARRAY_LENGTH(m_queue);
return data;
}