diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-12-07 14:48:04 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-12-23 16:02:19 +0400 |
commit | dff7424dc09635c33b42193fbb40c90fc9a971f4 (patch) | |
tree | fda83ed12cf421bf72152cb7683fcf61e5fb2ae3 /net | |
parent | 2e0fc3a488ef12c4e0e3ad4e1a07efec3a19169e (diff) | |
download | qemu-dff7424dc09635c33b42193fbb40c90fc9a971f4.zip qemu-dff7424dc09635c33b42193fbb40c90fc9a971f4.tar.gz qemu-dff7424dc09635c33b42193fbb40c90fc9a971f4.tar.bz2 |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -856,7 +856,7 @@ static int net_host_check_device(const char *device) ,"vde" #endif }; - for (i = 0; i < sizeof(valid_param_list) / sizeof(char *); i++) { + for (i = 0; i < ARRAY_SIZE(valid_param_list); i++) { if (!strncmp(valid_param_list[i], device, strlen(valid_param_list[i]))) return 1; |