net: dhcpv6: remove excluded middle expression
!A || (A && B) is equivalent to !A || B Drop the middle expression from the statement Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
This commit is contained in:

committed by
Jerome Forissier

parent
9a6964e419
commit
473032619f
@@ -473,8 +473,7 @@ static int dhcp6_check_advertise_packet(uchar *rx_pkt, unsigned int len)
|
|||||||
* server UID, save the new server UID and preference
|
* server UID, save the new server UID and preference
|
||||||
*/
|
*/
|
||||||
if (!sm_params.server_uid.uid_ptr ||
|
if (!sm_params.server_uid.uid_ptr ||
|
||||||
(sm_params.server_uid.uid_ptr &&
|
sm_params.server_uid.preference < sm_params.rx_status.preference) {
|
||||||
sm_params.server_uid.preference < sm_params.rx_status.preference)) {
|
|
||||||
rx_uid_size = sm_params.rx_status.server_uid_size;
|
rx_uid_size = sm_params.rx_status.server_uid_size;
|
||||||
if (sm_params.server_uid.uid_ptr)
|
if (sm_params.server_uid.uid_ptr)
|
||||||
free(sm_params.server_uid.uid_ptr);
|
free(sm_params.server_uid.uid_ptr);
|
||||||
|
Reference in New Issue
Block a user