Commit 31707f9f authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2310] added notes about htonl() portability considerations

parent 2ca96761
......@@ -138,6 +138,9 @@ namespace {
// A helper to convert a TTL value in network byte order and set it in
// ZoneData::min_ttl_. We can use util::OutputBuffer, but copy the logic
// here to guarantee it is exception free.
// Note: essentially this function is a local (re)implementation of the
// standard htonl() library function, but we avoid relying on it in case it's
// not available (it's not in the C++ standard library).
void
setTTLInNetOrder(uint32_t val, uint32_t* result) {
uint8_t buf[4];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment