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/net.c | |
parent | 2e0fc3a488ef12c4e0e3ad4e1a07efec3a19169e (diff) | |
download | hqemu-dff7424dc09635c33b42193fbb40c90fc9a971f4.zip hqemu-dff7424dc09635c33b42193fbb40c90fc9a971f4.tar.gz |
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/net.c')
-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; |