aboutsummaryrefslogtreecommitdiff
path: root/net
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
parent2e0fc3a488ef12c4e0e3ad4e1a07efec3a19169e (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index 9db88cc0ee..f8db85f30b 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;