R
root
Friends
I am bit twiddling on a 32 bit integer quantity. Often I need to look at
only the low 16 bits.
For this I currently AND with a mask.
It seems to me that it might simplify the code instead to have an union,
union u {
int32_t dw;
int16_t w;
};
But my question is: will this run in to port ability problems if I move
the code to a plat form with different endian ness?
/root
I am bit twiddling on a 32 bit integer quantity. Often I need to look at
only the low 16 bits.
For this I currently AND with a mask.
It seems to me that it might simplify the code instead to have an union,
union u {
int32_t dw;
int16_t w;
};
But my question is: will this run in to port ability problems if I move
the code to a plat form with different endian ness?
/root