Skip to content

Commit

Permalink
Revert "Fixes to ntohl() use and auto_ptr --> unique_ptr."
Browse files Browse the repository at this point in the history
This reverts commit c8c427b.
  • Loading branch information
jgallagher59701 committed Jul 2, 2019
1 parent a375d72 commit fad855c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions DDS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ DDS::print_das(ostream &out)
out << "}" << endl;
#endif

unique_ptr<DAS> das(get_das());
auto_ptr<DAS> das(get_das());

das->print(out);
}
Expand Down Expand Up @@ -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<AttrTable> global(new AttrTable);
auto_ptr<AttrTable> 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
Expand Down Expand Up @@ -1768,7 +1768,7 @@ DDS::mark(const string &n, bool state)
BaseType::btp_stack *s = new BaseType::btp_stack;
#endif

unique_ptr<BaseType::btp_stack> s(new BaseType::btp_stack);
auto_ptr<BaseType::btp_stack> s(new BaseType::btp_stack);

DBG2(cerr << "DDS::mark: Looking for " << n << endl);

Expand Down
6 changes: 3 additions & 3 deletions chunked_istream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions chunked_ostream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit fad855c

Please sign in to comment.