diff --git a/server/core/config_runtime.cc b/server/core/config_runtime.cc index 83882fcd0..6aa96b80d 100644 --- a/server/core/config_runtime.cc +++ b/server/core/config_runtime.cc @@ -2016,9 +2016,9 @@ json_t* runtime_get_json_error() json_t* obj = NULL; std::string errmsg = runtime_get_error(); - if (errmsg.length()) + if (!errmsg.empty()) { - obj = mxs_json_error(errmsg.c_str()); + obj = mxs_json_error("%s", errmsg.c_str()); } return obj;