1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 15:31:17 +01:00

cppcheck: fix warning in nhdp_address

This commit is contained in:
smlng 2016-12-22 09:59:54 +01:00
parent ea83b8c14f
commit 18ec3105f2

View File

@ -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);
}