mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +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 }
|
{"/index.htm", 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_DEFAULT_FILENAMES (sizeof(g_psDefaultFilenames) / \
|
#define NUM_DEFAULT_FILENAMES LWIP_ARRAYSIZE(g_psDefaultFilenames)
|
||||||
sizeof(default_filename))
|
|
||||||
|
|
||||||
#if LWIP_HTTPD_SUPPORT_REQUESTLIST
|
#if LWIP_HTTPD_SUPPORT_REQUESTLIST
|
||||||
/** HTTP request is copied here from pbufs for simple parsing */
|
/** HTTP request is copied here from pbufs for simple parsing */
|
||||||
|
@ -109,7 +109,7 @@ static const tHTTPHeader g_psHTTPHeaders[] = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_HTTP_HEADERS (sizeof(g_psHTTPHeaders) / sizeof(tHTTPHeader))
|
#define NUM_HTTP_HEADERS LWIP_ARRAYSIZE(g_psHTTPHeaders)
|
||||||
|
|
||||||
#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */
|
#endif /* LWIP_HTTPD_DYNAMIC_HEADERS */
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ static const tHTTPHeader g_psHTTPHeaders[] = {
|
|||||||
static const char *const g_pcSSIExtensions[] = {
|
static const char *const g_pcSSIExtensions[] = {
|
||||||
".shtml", ".shtm", ".ssi", ".xml"
|
".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_SSI */
|
||||||
|
|
||||||
#endif /* LWIP_HTTPD_STRUCTS_H */
|
#endif /* LWIP_HTTPD_STRUCTS_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user