Skip to content

Commit 67bb748

Browse files
author
Juha Heiskanen
committed
Codereview cleaning's
Change-Id: I86cad0fa3d4d4edc9e4e8342b2f3873c4080239a
1 parent 9350293 commit 67bb748

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,8 +1669,6 @@ int ws_bootstrap_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t
16691669
blacklist_update(ll_address, false);
16701670
rpl_control_neighbor_delete(cur, ll_address);
16711671
ws_bootstrap_neighbor_remove(cur, ll_address);
1672-
//Cancel DHCPV6 If it is active but not finished yest
1673-
//dhcp_client_address_cancel(cur->id, NULL);
16741672
return 0;
16751673
}
16761674

source/DHCPv6_client/dhcpv6_client_service.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -317,20 +317,19 @@ int dhcp_client_server_address_update(int8_t interface, uint8_t prefix[static 16
317317
} else if (dhcp_client.one_instance_interface) {
318318
srv_data_ptr = libdhcpv6_nonTemporal_entry_get_by_instance(dhcp_client.libDhcp_instance);
319319
}
320-
if (srv_data_ptr) {
321-
if (memcmp(srv_data_ptr->server_address, server_address, 16) == 0) {
322-
return 0;
323-
}
320+
if (!srv_data_ptr) {
321+
return -1;
324322
}
325323

326-
if (srv_data_ptr) {
327-
memcpy(srv_data_ptr->server_address, server_address, 16);
328-
if (!srv_data_ptr->iaNonTemporalStructValid) {
329-
dhcp_service_update_server_address(srv_data_ptr->transActionId, server_address);
330-
}
324+
if (memcmp(srv_data_ptr->server_address, server_address, 16) == 0) {
331325
return 0;
332326
}
333-
return -1;
327+
328+
memcpy(srv_data_ptr->server_address, server_address, 16);
329+
if (!srv_data_ptr->iaNonTemporalStructValid) {
330+
dhcp_service_update_server_address(srv_data_ptr->transActionId, server_address);
331+
}
332+
return 0;
334333
}
335334

336335

source/libDHCPv6/dhcp_service_api.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ void dhcp_service_update_server_address(uint32_t msg_tr_id, uint8_t *server_addr
755755
msg_tr_ptr = dhcp_tr_find(msg_tr_id);
756756

757757
if (msg_tr_ptr != NULL) {
758-
tr_debug("Set New Server address %s", trace_ipv6(server_address));
759758
memcpy(msg_tr_ptr->addr.address, server_address, 16);
760759
}
761760
}

0 commit comments

Comments
 (0)