TO_NATIVE_ENDIAN2

Table of Contents

TO_NATIVE_ENDIAN2

Description

Maintains native endianness for 16-bit values. This is a no-op that returns the value unchanged.

Parameters

NameDirectionDescription
xin16-bit value in native byte order

Success

Returns value in native byte order (unchanged).

Failure

Function cannot fail - pure passthrough operation.

Usage example (Cross-references)

    }
    
    *v = TO_NATIVE_ENDIAN2(*v);
    
    return i + 2; // Advance the stream pointer by 2 bytes.

Share :

Related Posts

TO_BIG_ENDIAN2

TO_BIG_ENDIAN2 Description Conditionally converts value from native byte order to big-endian. On little-endian systems, this inverts the byte order. On big-endian systems, this is a no-op.

Read More

FROM_LITTLE_ENDIAN2

FROM_LITTLE_ENDIAN2 Description Conditionally converts value from little-endian to native byte order. On big-endian systems, this inverts the byte order. On little-endian systems, this is a no-op.

Read More

TO_BIG_ENDIAN4

TO_BIG_ENDIAN4 Description Conditionally converts value from native byte order to big-endian. On little-endian systems, this inverts the byte order. On big-endian systems, this is a no-op.

Read More