diff options
author | Arne Juul <arnej@verizonmedia.com> | 2021-02-15 13:54:24 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2021-02-15 14:16:17 +0000 |
commit | c0b8734987176a93588909739af143c6b0a1a6ff (patch) | |
tree | 33340f0cfc5e9e4b8691abdaa378712f3bf8ded5 /vespalib/src/apps | |
parent | e385cf1498861b27da4312828613bdabab9b2161 (diff) |
use size literals in vespalib
Diffstat (limited to 'vespalib/src/apps')
-rw-r--r-- | vespalib/src/apps/vespa-detect-hostname/detect_hostname.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vespalib/src/apps/vespa-detect-hostname/detect_hostname.cpp b/vespalib/src/apps/vespa-detect-hostname/detect_hostname.cpp index d65c8f20e12..86f615f407b 100644 --- a/vespalib/src/apps/vespa-detect-hostname/detect_hostname.cpp +++ b/vespalib/src/apps/vespa-detect-hostname/detect_hostname.cpp @@ -5,6 +5,7 @@ #include <vespa/vespalib/net/socket_address.h> #include <vespa/vespalib/stllike/string.h> #include <vespa/vespalib/util/stringfmt.h> +#include <vespa/vespalib/util/size_literals.h> #include <set> using vespalib::SocketAddress; @@ -18,7 +19,7 @@ std::set<vespalib::string> make_ip_set() { } vespalib::string get_hostname() { - std::vector<char> result(4096, '\0'); + std::vector<char> result(4_Ki, '\0'); gethostname(&result[0], 4000); return SocketAddress::normalize(&result[0]); } |