Browse Source

cppcheck: fix warning in nhdp_address

pr/spi.typo
smlng 6 years ago
parent
commit
18ec3105f2
  1. 4
      sys/net/routing/nhdp/nhdp_address.c

4
sys/net/routing/nhdp/nhdp_address.c

@ -89,15 +89,13 @@ void nhdp_decrement_addr_usage(nhdp_addr_t *addr)
/* Decrement usage count and delete address if no longer used */
if (addr) {
addr->usg_count--;
if (addr->usg_count <= 0) {
if (addr->usg_count == 0) {
/* Free address space if address is no longer used */
LL_DELETE(nhdp_addr_db_head, addr);
free(addr->addr);
free(addr);
}
}
mutex_unlock(&mtx_addr_access);
}

Loading…
Cancel
Save