context->message_id has been incremented as a side-effect of calling the htons macro. To avoid potential issues with this, the increment operation has been moved outside the macro call.