MCPcopy Create free account
hub / github.com/defold/defold / ReadU16

Function ReadU16

engine/dlib/src/test/test_mdns.cpp:442–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440 }
441
442 static bool ReadU16(const uint8_t* data, uint32_t size, uint32_t* offset, uint16_t* out)
443 {
444 if (*offset + 2 > size)
445 return false;
446 *out = (uint16_t) ((data[*offset] << 8) | data[*offset + 1]);
447 *offset += 2;
448 return true;
449 }
450
451 static bool ReadU32(const uint8_t* data, uint32_t size, uint32_t* offset, uint32_t* out)
452 {

Callers 1

ParseDnsPacketFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected