Michael Stefaniuc : wininet: Avoid an ARRAY_SIZE-like macro.
Module: wine Branch: master Commit: 717a17b24fa37df8d20a51f37b7d96e61b81a5bf URL: https://source.winehq.org/git/wine.git/?a=commit;h=717a17b24fa37df8d20a51f37... Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu Sep 20 19:13:58 2018 +0200 wininet: Avoid an ARRAY_SIZE-like macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wininet/http.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index b7be993..9e839ce 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3513,8 +3513,6 @@ static const LPCWSTR header_lookup[] = { szUnless_Modified_Since, /* HTTP_QUERY_UNLESS_MODIFIED_SINCE = 70 */ }; -#define LAST_TABLE_HEADER (sizeof(header_lookup)/sizeof(header_lookup[0])) - /*********************************************************************** * HTTP_HttpQueryInfoW (internal) */ @@ -3700,9 +3698,9 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *request, DWORD dwInfoLevel, return res; } default: - assert (LAST_TABLE_HEADER == (HTTP_QUERY_UNLESS_MODIFIED_SINCE + 1)); + assert (ARRAY_SIZE(header_lookup) == (HTTP_QUERY_UNLESS_MODIFIED_SINCE + 1)); - if (level < LAST_TABLE_HEADER && header_lookup[level]) + if (level < ARRAY_SIZE(header_lookup) && header_lookup[level]) index = HTTP_GetCustomHeaderIndex(request, header_lookup[level], requested_index,request_only); }
participants (1)
-
Alexandre Julliard