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

Function UIntToByte

test/base-object-packer.cpp:33–43  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

31 * Avoid implementation-defined overflows during unsigned to signed casts
32 */
33static inline char UIntToByte(unsigned i)
34{
35#if CHAR_MIN == 0
36 return i;
37#else
38 CharU2SConverter converter;
39
40 converter.u = i;
41 return converter.s;
42#endif
43}
44
45#if CHAR_MIN != 0
46union CharS2UConverter

Callers 1

ComparePackObjectResultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected