summaryrefslogtreecommitdiffstats
path: root/net/net.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-12-07 14:48:04 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2013-12-23 16:02:19 +0400
commitdff7424dc09635c33b42193fbb40c90fc9a971f4 (patch)
treefda83ed12cf421bf72152cb7683fcf61e5fb2ae3 /net/net.c
parent2e0fc3a488ef12c4e0e3ad4e1a07efec3a19169e (diff)
downloadhqemu-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index 9db88cc..f8db85f 100644
--- a/net/net.c
+++ b/net/net.c
@@ -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;
OpenPOWER on IntegriCloud