why use while(0) to write set_current_state