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 --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') 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; -- cgit v1.2.3