From b7e73025fe086f62fcef49a3f8444e5287b409e1 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 19 Aug 2019 19:46:47 +0200 Subject: [PATCH] Fixed syntax error in esp_http_server.rst Changed the "const char[] name" into "const char name[]", so now the code doesn't produce the "expected identifier or '(' before '[' token" error. Closes https://github.com/espressif/esp-idf/pull/3940 --- docs/en/api-reference/protocols/esp_http_server.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/api-reference/protocols/esp_http_server.rst b/docs/en/api-reference/protocols/esp_http_server.rst index e37982bf66..a660173a6b 100644 --- a/docs/en/api-reference/protocols/esp_http_server.rst +++ b/docs/en/api-reference/protocols/esp_http_server.rst @@ -22,7 +22,7 @@ Application Example esp_err_t get_handler(httpd_req_t *req) { /* Send a simple response */ - const char[] resp = "URI GET Response"; + const char resp[] = "URI GET Response"; httpd_resp_send(req, resp, strlen(resp)); return ESP_OK; } @@ -55,7 +55,7 @@ Application Example } /* Send a simple response */ - const char[] resp = "URI POST Response"; + const char resp[] = "URI POST Response"; httpd_resp_send(req, resp, strlen(resp)); return ESP_OK; }