sd-dhcp-client: merge client_send_release() into sd_dhcp_client_send_release()
The public function and the implementation were split into two for no particular reason. We would assert() on the internal state of the client. This should not be done in a function that is directly called from a public function. (I.e., we should not crash if the public function is called at the wrong time.) assert() is changed to assert_return(). And before anyone asks: I put the assert_returns() *above* the internal variables on purpose. This makes it easier to see that the assert_returns() are about the state that is passed in, and if they are not satisfied, the function returns immediately. The compiler doesn't care either way, so the ordering that is clearest to the reader should be chosen.
Loading
Please register or sign in to comment