From: Otto Moerbeek Date: Thu, 25 Sep 2025 07:34:17 +0000 (+0200) Subject: Use two-line format as pdnsutil does X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F16175%2Fhead;p=thirdparty%2Fpdns.git Use two-line format as pdnsutil does Signed-off-by: Otto Moerbeek --- diff --git a/pdns/recursordist/rec_channel_rec.cc b/pdns/recursordist/rec_channel_rec.cc index 443ad2e35..d3c476b12 100644 --- a/pdns/recursordist/rec_channel_rec.cc +++ b/pdns/recursordist/rec_channel_rec.cc @@ -35,6 +35,7 @@ #include "negcache.hh" #include #include +#include #include "version.hh" #include @@ -1953,18 +1954,8 @@ static RecursorControlChannel::Answer help() }; ostringstream str; for (const auto& command : commands) { - const size_t maxwidth = 32; - auto len = command.first.length(); - if (len < maxwidth) { - str << command.first; - str << std::string(maxwidth - len, ' '); - } - else { - str << command.first << endl; - str << std::string(maxwidth, ' '); - } - str << command.second; - str << endl; + str << command.first << endl; + str << std::setw(8) << ' ' << command.second << endl; } return {0, str.str()}; }