Commit 1957879e authored by Sergey Lyubka's avatar Sergey Lyubka

Casting to int in mg_sprintf() call in handle_cgi

parent ddbe6906
...@@ -1141,7 +1141,7 @@ static void open_cgi_endpoint(struct connection *conn, const char *prog) { ...@@ -1141,7 +1141,7 @@ static void open_cgi_endpoint(struct connection *conn, const char *prog) {
if ((p = strrchr(prog, '/')) == NULL) { if ((p = strrchr(prog, '/')) == NULL) {
mg_snprintf(dir, sizeof(dir), "%s", "."); mg_snprintf(dir, sizeof(dir), "%s", ".");
} else { } else {
mg_snprintf(dir, sizeof(dir), "%.*s", p - prog, prog); mg_snprintf(dir, sizeof(dir), "%.*s", (int) (p - prog), prog);
} }
// Try to create socketpair in a loop until success. mg_socketpair() // Try to create socketpair in a loop until success. mg_socketpair()
......
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