From dff7424dc09635c33b42193fbb40c90fc9a971f4 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 7 Dec 2013 14:48:04 +0100 Subject: misc: Use macro ARRAY_SIZE where possible This improves readability and simplifies the code. Cc: Anthony Liguori Cc: Gerd Hoffmann Cc: Stefan Hajnoczi Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- qemu-char.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qemu-char.c') diff --git a/qemu-char.c b/qemu-char.c index 418dc69d39..30c5a6afd0 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -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 */ -- cgit v1.2.1