String literal should be const

This commit is contained in:
Roger A. Light
2026-01-21 15:48:34 +00:00
parent 61e1981d6f
commit 61794d79bc

View File

@@ -363,7 +363,7 @@ static int check_access(struct mosquitto__listener *listener, struct MHD_Connect
MHD_free(context.password);
if(auth_rc || acl_rc){
char *buf = "Not authorised\n";
const char *buf = "Not authorised\n";
struct MHD_Response *response = MHD_create_response_from_buffer(strlen(buf), (void *)buf, MHD_RESPMEM_MUST_COPY);
MHD_queue_basic_auth_fail_response(connection, "Mosquitto API", response);
MHD_destroy_response(response);