From b5334b70b0b8c555578aa4fb48bcb01c9e3c2c5e Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Thu, 25 Sep 2025 09:34:17 +0200 Subject: [PATCH] Use two-line format as pdnsutil does Signed-off-by: Otto Moerbeek --- pdns/recursordist/rec_channel_rec.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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()}; } -- 2.47.3