mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
apps/httpd: Use LWIP_ARRAYSIZE at appropriate places
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
parent
5cd6c38893
commit
6cbee37a58
@ -159,8 +159,7 @@ const default_filename g_psDefaultFilenames[] = {
|
||||
{"/index.htm", 0 }
|
||||
};
|
||||
|
||||
#define NUM_DEFAULT_FILENAMES (sizeof(g_psDefaultFilenames) / \
|
||||
sizeof(default_filename))
|
||||
#define NUM_DEFAULT_FILENAMES LWIP_ARRAYSIZE(g_psDefaultFilenames)
|
||||
|
||||
#if LWIP_HTTPD_SUPPORT_REQUESTLIST
|
||||
/** HTTP request is copied here from pbufs for simple parsing */
|
||||
|
@ -109,7 +109,7 @@ static const tHTTPHeader g_psHTTPHeaders[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
#define NUM_HTTP_HEADERS (sizeof(g_psHTTPHeaders) / sizeof(tHTTPHeader))
|
||||
#define NUM_HTTP_HEADERS LWIP_ARRAYSIZE(g_psHTTPHeaders)
|
||||
|
||||
#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */
|
||||
|
||||
@ -117,7 +117,7 @@ static const tHTTPHeader g_psHTTPHeaders[] = {
|
||||
static const char *const g_pcSSIExtensions[] = {
|
||||
".shtml", ".shtm", ".ssi", ".xml"
|
||||
};
|
||||
#define NUM_SHTML_EXTENSIONS (sizeof(g_pcSSIExtensions) / sizeof(const char *))
|
||||
#define NUM_SHTML_EXTENSIONS LWIP_ARRAYSIZE(g_pcSSIExtensions)
|
||||
#endif /* LWIP_HTTPD_SSI */
|
||||
|
||||
#endif /* LWIP_HTTPD_STRUCTS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user