diff options
Diffstat (limited to 'src/shrpx_log_config.cc')
-rw-r--r-- | src/shrpx_log_config.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shrpx_log_config.cc b/src/shrpx_log_config.cc index 92eb055..9d066f2 100644 --- a/src/shrpx_log_config.cc +++ b/src/shrpx_log_config.cc @@ -50,10 +50,8 @@ LogConfig::LogConfig() errorlog_tty(false) { auto tid = std::this_thread::get_id(); auto tid_hash = - util::hash32(StringRef{reinterpret_cast<uint8_t *>(&tid), - reinterpret_cast<uint8_t *>(&tid) + sizeof(tid)}); - thread_id = util::format_hex(reinterpret_cast<uint8_t *>(&tid_hash), - sizeof(tid_hash)); + util::hash32(StringRef{reinterpret_cast<char *>(&tid), sizeof(tid)}); + thread_id = util::format_hex(std::span{&tid_hash, 1}); } #ifndef NOTHREADS |