File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,10 @@ in_addr ColumnIPv4::operator [] (size_t n) const {
6161
6262std::string ColumnIPv4::AsString (size_t n) const {
6363 const auto & addr = this ->At (n);
64+ auto tmp_addr = addr;
6465
6566 char buf[INET_ADDRSTRLEN];
66- const char * ip_str = inet_ntop (AF_INET, &addr , buf, INET_ADDRSTRLEN);
67+ const char * ip_str = inet_ntop (AF_INET, &tmp_addr , buf, INET_ADDRSTRLEN);
6768
6869 if (ip_str == nullptr ) {
6970 throw std::system_error (
Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ void ColumnIPv6::Clear() {
4444
4545std::string ColumnIPv6::AsString (size_t n) const {
4646 const auto & addr = this ->At (n);
47+ auto tmp_addr = addr;
4748
4849 char buf[INET6_ADDRSTRLEN];
49- const char * ip_str = inet_ntop (AF_INET6, &addr , buf, INET6_ADDRSTRLEN);
50+ const char * ip_str = inet_ntop (AF_INET6, &tmp_addr , buf, INET6_ADDRSTRLEN);
5051
5152 if (ip_str == nullptr ) {
5253 throw std::system_error (
You can’t perform that action at this time.
0 commit comments