From fad855c9073ffddb754c59070a1af5b7004245e4 Mon Sep 17 00:00:00 2001 From: James Gallagher Date: Tue, 2 Jul 2019 14:28:19 -0600 Subject: [PATCH] Revert "Fixes to ntohl() use and auto_ptr --> unique_ptr." This reverts commit c8c427b01dd95ff2f0da820630ffc8133d77d0aa. --- DDS.cc | 6 +++--- chunked_istream.cc | 6 +++--- chunked_ostream.cc | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DDS.cc b/DDS.cc index 5da4b0607..5488f8c42 100644 --- a/DDS.cc +++ b/DDS.cc @@ -1193,7 +1193,7 @@ DDS::print_das(ostream &out) out << "}" << endl; #endif - unique_ptr das(get_das()); + auto_ptr das(get_das()); das->print(out); } @@ -1297,7 +1297,7 @@ void DDS::get_das(DAS *das) } // Used in the rare case we have global attributes not in a table. - unique_ptr global(new AttrTable); + auto_ptr global(new AttrTable); for (AttrTable::Attr_iter i = d_attr.attr_begin(); i != d_attr.attr_end(); ++i) { // It's possible, given the API and if the DDS was built from a DMR, that a @@ -1768,7 +1768,7 @@ DDS::mark(const string &n, bool state) BaseType::btp_stack *s = new BaseType::btp_stack; #endif - unique_ptr s(new BaseType::btp_stack); + auto_ptr s(new BaseType::btp_stack); DBG2(cerr << "DDS::mark: Looking for " << n << endl); diff --git a/chunked_istream.cc b/chunked_istream.cc index 9204f3b81..3270d7ed0 100644 --- a/chunked_istream.cc +++ b/chunked_istream.cc @@ -99,7 +99,7 @@ chunked_inbuf::underflow() #if !BYTE_ORDER_PREFIX // When the endian nature of the server is encoded in the chunk header, the header is // sent using network byte order - header = ntohl(header); + ntohl(header); #endif // There are two 'EOF' cases: One where the END chunk is zero bytes and one where @@ -219,7 +219,7 @@ chunked_inbuf::xsgetn(char* s, std::streamsize num) uint32_t header; d_is.read((char *) &header, 4); #if !BYTE_ORDER_PREFIX - header = ntohl(header); + ntohl(header); #endif // There are two EOF cases: One where the END chunk is zero bytes and one where @@ -344,7 +344,7 @@ chunked_inbuf::read_next_chunk() uint32_t header; d_is.read((char *) &header, 4); #if !BYTE_ORDER_PREFIX - header = ntohl(header); + ntohl(header); #endif // There are two 'EOF' cases: One where the END chunk is zero bytes and one where diff --git a/chunked_ostream.cc b/chunked_ostream.cc index 5979c2dab..2cf4211c5 100644 --- a/chunked_ostream.cc +++ b/chunked_ostream.cc @@ -78,7 +78,7 @@ chunked_outbuf::data_chunk() // Add encoding of host's byte order. jhrg 11/24/13 if (!d_big_endian) header |= CHUNK_LITTLE_ENDIAN; // network byte order for the header - header = htonl(header); + htonl(header); #endif d_os.write((const char *)&header, sizeof(int32_t)); @@ -121,7 +121,7 @@ chunked_outbuf::end_chunk() // Add encoding of host's byte order. jhrg 11/24/13 if (!d_big_endian) header |= CHUNK_LITTLE_ENDIAN; // network byte order for the header - header = htonl(header); + htonl(header); #endif // Write out the CHUNK_END header with the byte count. @@ -168,7 +168,7 @@ chunked_outbuf::err_chunk(const std::string &m) // Add encoding of host's byte order. jhrg 11/24/13 if (!d_big_endian) header |= CHUNK_LITTLE_ENDIAN; // network byte order for the header - header = htonl(header); + htonl(header); #endif // Write out the CHUNK_END header with the byte count. @@ -275,7 +275,7 @@ chunked_outbuf::xsputn(const char *s, std::streamsize num) // Add encoding of host's byte order. jhrg 11/24/13 if (!d_big_endian) header |= CHUNK_LITTLE_ENDIAN; // network byte order for the header - header = htonl(header); + htonl(header); #endif d_os.write((const char *)&header, sizeof(int32_t)); // Data chunk's CHUNK_TYPE is 0x00000000