From 80b8b39899a09c7516920cda5fd343b3086d4824 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 25 Jun 2007 10:55:35 +0000 Subject: Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms ) --- networking/httpd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'networking/httpd.c') diff --git a/networking/httpd.c b/networking/httpd.c index 8c0a83e..383a006 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -878,11 +878,8 @@ static int sendHeaders(HttpResponseNum responseNum) time_t timer = time(0); char timeStr[80]; int len; - enum { - numNames = sizeof(httpResponseNames) / sizeof(httpResponseNames[0]) - }; - for (i = 0; i < numNames; i++) { + for (i = 0; i < ARRAY_SIZE(httpResponseNames); i++) { if (httpResponseNames[i].type == responseNum) { responseString = httpResponseNames[i].name; infoString = httpResponseNames[i].info; -- cgit v1.1