mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
misc: Use macro ARRAY_SIZE where possible
This improves readability and simplifies the code. Cc: Anthony Liguori <aliguori@amazon.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
2e0fc3a488
commit
dff7424dc0
3 changed files with 4 additions and 5 deletions
|
@ -1975,8 +1975,7 @@ static void win_stdio_wait_func(void *opaque)
|
|||
DWORD dwSize;
|
||||
int i;
|
||||
|
||||
ret = ReadConsoleInput(stdio->hStdIn, buf, sizeof(buf) / sizeof(*buf),
|
||||
&dwSize);
|
||||
ret = ReadConsoleInput(stdio->hStdIn, buf, ARRAY_SIZE(buf), &dwSize);
|
||||
|
||||
if (!ret) {
|
||||
/* Avoid error storm */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue