mirror of
https://github.com/matrix-construct/construct
synced 2024-09-26 18:38:52 +02:00
ircd: Fix possible null directive arguments (-Wformat-truncation gcc-11).
This commit is contained in:
parent
f705df096d
commit
c664963e8d
2 changed files with 10 additions and 3 deletions
|
@ -1277,7 +1277,14 @@ ircd::http::error::error(const http::code &code,
|
||||||
,code{code}
|
,code{code}
|
||||||
{
|
{
|
||||||
auto &buf(ircd::error::buf);
|
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.
|
// Out-of-line placement.
|
||||||
|
|
|
@ -354,8 +354,8 @@ ircd::ios::stats_name(const descriptor &d,
|
||||||
(
|
(
|
||||||
stats_name_buf, sizeof(stats_name_buf),
|
stats_name_buf, sizeof(stats_name_buf),
|
||||||
"ircd.ios.%s.%s",
|
"ircd.ios.%s.%s",
|
||||||
d.name.c_str(),
|
d.name? d.name.c_str(): "",
|
||||||
key.c_str()
|
key? key.c_str(): ""
|
||||||
))
|
))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue