diff --git a/doc/sphinx/arm/hooks.rst b/doc/sphinx/arm/hooks.rst index 2c8e048bed..0eb2f56824 100644 --- a/doc/sphinx/arm/hooks.rst +++ b/doc/sphinx/arm/hooks.rst @@ -619,7 +619,7 @@ Where: - relay-info - for relayed packets the giaddr and the RAI circuit-id, remote-id, and subscriber-id options (option 82 sub options: 1, 2 and 6) if present. The circuit id and remote id are presented as hex - strings and when printable with their content. + strings. When their content is printable it is displayed. - user-context - the optional user context associated with the lease. diff --git a/src/lib/util/strutil.h b/src/lib/util/strutil.h index 16d0ceed19..5a3a6c5e9c 100644 --- a/src/lib/util/strutil.h +++ b/src/lib/util/strutil.h @@ -344,9 +344,8 @@ typedef boost::shared_ptr StringSanitizerPtr; /// \param content String to check for printable characters /// \return True if empty or contains only printable characters, False otherwise inline bool -isPrintable(const std::string& content) -{ - for (const unsigned char& ch : content) { +isPrintable(const std::string& content) { + for (const auto& ch : content) { if (isprint(ch) == 0) { return (false); } @@ -359,9 +358,8 @@ isPrintable(const std::string& content) /// \param content Vector to check for printable characters /// \return True if empty or contains only printable characters, False otherwise inline bool -isPrintable(const std::vector& content) -{ - for (const unsigned char& ch : content) { +isPrintable(const std::vector& content) { + for (const auto& ch : content) { if (isprint(ch) == 0) { return (false); }