Commit 240eca0b authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Avoid passing NULL to %.*s

CC3200 (TI's C library) doesn't like it

https://e2e.ti.com/support/development_tools/compiler/f/343/t/554883

PUBLISHED_FROM=d0e9fb7ebb7d189d1a76451d609f1f1861c7a837
parent cd54b18d
...@@ -7431,7 +7431,8 @@ struct mg_connection *mg_connect_http_opt(struct mg_mgr *mgr, ...@@ -7431,7 +7431,8 @@ struct mg_connection *mg_connect_http_opt(struct mg_mgr *mgr,
mg_printf(nc, "%s %s HTTP/1.1\r\nHost: %s\r\nContent-Length: %" SIZE_T_FMT mg_printf(nc, "%s %s HTTP/1.1\r\nHost: %s\r\nContent-Length: %" SIZE_T_FMT
"\r\n%.*s%s\r\n%s", "\r\n%.*s%s\r\n%s",
post_data == NULL ? "GET" : "POST", path, addr, post_data == NULL ? "GET" : "POST", path, addr,
post_data == NULL ? 0 : strlen(post_data), (int) auth.len, auth.buf, post_data == NULL ? 0 : strlen(post_data),
(int) auth.len, (auth.buf == NULL ? "" : auth.buf),
extra_headers == NULL ? "" : extra_headers, extra_headers == NULL ? "" : extra_headers,
post_data == NULL ? "" : post_data); post_data == NULL ? "" : post_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment