1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

ng_pktbuf: Use atomic_dec instead of atomic_set_return

This commit is contained in:
Joakim Gebart 2015-04-26 09:22:52 +02:00
parent 748499b737
commit 6821350835

View File

@ -134,7 +134,7 @@ ng_pktsnip_t *ng_pktbuf_start_write(ng_pktsnip_t *pkt)
res = _pktbuf_duplicate(pkt);
atomic_set_return(&pkt->users, pkt->users - 1);
atomic_dec(&pkt->users);
mutex_unlock(&_pktbuf_mutex);