diff --git a/ircd/http.cc b/ircd/http.cc index 63fa63930..62ed29c9c 100644 --- a/ircd/http.cc +++ b/ircd/http.cc @@ -1277,7 +1277,14 @@ ircd::http::error::error(const http::code &code, ,code{code} { auto &buf(ircd::error::buf); - ::snprintf(buf, sizeof(buf), "%u %s", uint(code), status(code).c_str()); + const auto msg(status(code)); + ::snprintf + ( + buf, sizeof(buf), + "%u %s", + uint(code), + msg? msg.c_str(): "" + ); } // Out-of-line placement. diff --git a/ircd/ios.cc b/ircd/ios.cc index 836da2913..3da30b3d9 100644 --- a/ircd/ios.cc +++ b/ircd/ios.cc @@ -354,8 +354,8 @@ ircd::ios::stats_name(const descriptor &d, ( stats_name_buf, sizeof(stats_name_buf), "ircd.ios.%s.%s", - d.name.c_str(), - key.c_str() + d.name? d.name.c_str(): "", + key? key.c_str(): "" )) }; }