diff --git a/src/node/address.cc b/src/node/address.cc index 33104083d..0cc37b1a2 100644 --- a/src/node/address.cc +++ b/src/node/address.cc @@ -147,7 +147,7 @@ std::ostream& operator<< (std::ostream& os, const Address & address) return os; } os.setf (std::ios::hex, std::ios::basefield); - std::cout.fill('0'); + os.fill('0'); for (uint8_t i=0; i < (address.m_len-1); i++) { os << std::setw(2) << (uint32_t)address.m_data[i] << ":"; @@ -155,7 +155,7 @@ std::ostream& operator<< (std::ostream& os, const Address & address) // Final byte not suffixed by ":" os << std::setw(2) << (uint32_t)address.m_data[address.m_len-1]; os.setf (std::ios::dec, std::ios::basefield); - std::cout.fill(' '); + os.fill(' '); return os; } diff --git a/src/node/eui48-address.cc b/src/node/eui48-address.cc index 096a1cc38..fd78d4e0f 100644 --- a/src/node/eui48-address.cc +++ b/src/node/eui48-address.cc @@ -148,7 +148,7 @@ std::ostream& operator<< (std::ostream& os, const Eui48Address & address) address.CopyTo (ad); os.setf (std::ios::hex, std::ios::basefield); - std::cout.fill('0'); + os.fill('0'); for (uint8_t i=0; i < 5; i++) { os << std::setw(2) << (uint32_t)ad[i] << ":"; @@ -156,7 +156,7 @@ std::ostream& operator<< (std::ostream& os, const Eui48Address & address) // Final byte not suffixed by ":" os << std::setw(2) << (uint32_t)ad[5]; os.setf (std::ios::dec, std::ios::basefield); - std::cout.fill(' '); + os.fill(' '); return os; } diff --git a/src/node/eui64-address.cc b/src/node/eui64-address.cc index 342fd4d91..af539f950 100644 --- a/src/node/eui64-address.cc +++ b/src/node/eui64-address.cc @@ -150,7 +150,7 @@ std::ostream& operator<< (std::ostream& os, const Eui64Address & address) address.CopyTo (ad); os.setf (std::ios::hex, std::ios::basefield); - std::cout.fill('0'); + os.fill('0'); for (uint8_t i=0; i < 7; i++) { os << std::setw(2) << (uint32_t)ad[i] << ":"; @@ -158,7 +158,7 @@ std::ostream& operator<< (std::ostream& os, const Eui64Address & address) // Final byte not suffixed by ":" os << std::setw(2) << (uint32_t)ad[7]; os.setf (std::ios::dec, std::ios::basefield); - std::cout.fill(' '); + os.fill(' '); return os; }