MCPcopy Create free account
hub / github.com/Icinga/icinga2 / UIntToByte

Function UIntToByte

lib/base/object-packer.cpp:61–71  ·  view source on GitHub ↗

* Avoid implementation-defined overflows during unsigned to signed casts */

Source from the content-addressed store, hash-verified

59 * Avoid implementation-defined overflows during unsigned to signed casts
60 */
61static inline char UIntToByte(unsigned i)
62{
63#if CHAR_MIN == 0
64 return i;
65#else
66 CharU2SConverter converter;
67
68 converter.u = i;
69 return converter.s;
70#endif
71}
72
73/**
74 * Append the given int as big-endian 64-bit unsigned int

Callers 1

PackUInt64BEFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected