From b73187713f7f2f8142aeb7facd9441ddb4c4ef00 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 27 Mar 2011 13:07:48 +0000 Subject: [PATCH] httpd: move some variables from rwdata- to rodata- or bss-section --- apps/httpserver_raw/httpd.c | 6 +++--- apps/httpserver_raw/httpd_structs.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/httpserver_raw/httpd.c b/apps/httpserver_raw/httpd.c index b668a8b..6f1132c 100644 --- a/apps/httpserver_raw/httpd.c +++ b/apps/httpserver_raw/httpd.c @@ -276,7 +276,7 @@ static char http_post_response_filename[LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN+1]; #define HTTPD_LAST_TAG_PART 0xFFFF -const char *g_pcSSIExtensions[] = { +const char * const g_pcSSIExtensions[] = { ".shtml", ".shtm", ".ssi", ".xml" }; @@ -365,8 +365,8 @@ const char * const g_pcTagLeadOut = "-->"; #if LWIP_HTTPD_CGI /* CGI handler information */ -const tCGI *g_pCGIs = NULL; -int g_iNumCGIs = 0; +const tCGI *g_pCGIs; +int g_iNumCGIs; #endif /* LWIP_HTTPD_CGI */ #if LWIP_HTTPD_STRNSTR_PRIVATE diff --git a/apps/httpserver_raw/httpd_structs.h b/apps/httpserver_raw/httpd_structs.h index b211ef7..1080a55 100644 --- a/apps/httpserver_raw/httpd_structs.h +++ b/apps/httpserver_raw/httpd_structs.h @@ -28,7 +28,7 @@ typedef struct } tHTTPHeader; /** A list of strings used in HTTP headers */ -static const char *g_psHTTPHeaderStrings[] = +static const char * const g_psHTTPHeaderStrings[] = { "Content-type: text/html\r\n\r\n", "Content-type: text/html\r\nExpires: Fri, 10 Apr 2008 14:00:00 GMT\r\nPragma: no-cache\r\n\r\n", @@ -87,7 +87,7 @@ static const char *g_psHTTPHeaderStrings[] = #define DEFAULT_404_HTML 25 /* default 404 body */ /** A list of extension-to-HTTP header strings */ -static tHTTPHeader g_psHTTPHeaders[] = +const static tHTTPHeader g_psHTTPHeaders[] = { { "html", HTTP_HDR_HTML}, { "htm", HTTP_HDR_HTML},