You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2024/01/30 16:27:00 UTC
(trafficserver-libswoc) 06/09: Fix return value from IP6Addr::operator=().
This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch dev-1-2-7
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git
commit 668e55ab470a569cc0501877e0bf6b876b3b4979
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Mon Jun 22 14:47:51 2020 -0500
Fix return value from IP6Addr::operator=().
---
code/include/swoc/swoc_ip.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/code/include/swoc/swoc_ip.h b/code/include/swoc/swoc_ip.h
index 4398dd6..5affe96 100644
--- a/code/include/swoc/swoc_ip.h
+++ b/code/include/swoc/swoc_ip.h
@@ -2211,9 +2211,11 @@ inline auto IP6Addr::operator=(in6_addr const& addr) -> self_type& {
inline auto IP6Addr::operator=(sockaddr_in6 const *addr) -> self_type& {
if (addr) {
- return *this = addr->sin6_addr;
+ *this = addr->sin6_addr;
+ } else {
+ this->clear();
}
- this->clear();
+ return *this;
}
inline IP6Addr&