0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd: Fix error / simplify.

This commit is contained in:
Jason Volk 2018-03-01 02:30:59 -08:00
parent 2fcaf8c758
commit ebed17d9d0

View file

@ -666,10 +666,10 @@ ircd::u2a(const mutable_buffer &out,
const const_buffer &in)
{
char *p(data(out));
for(size_t i(0); i < size(in); ++i)
p += snprintf(p, size(out) - (p - data(out)), "%02x", in[i]);
for(size_t i(0); i < size(in); ++i, p += 2)
snprintf(p, end(out) - p, "%02x", in[i]);
return { data(out), size_t(p - data(out)) };
return { data(out), p };
}
ircd::const_buffer