Why do you use sizeof( int ) if all your variables are of unsigned int type? I know there is no difference in result but it looks strange for code reader.