From 682135083579a71e6eb80e74fc79d24f0b0edce9 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Sun, 26 Apr 2015 09:22:52 +0200 Subject: [PATCH] ng_pktbuf: Use atomic_dec instead of atomic_set_return --- sys/net/crosslayer/ng_pktbuf/ng_pktbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/crosslayer/ng_pktbuf/ng_pktbuf.c b/sys/net/crosslayer/ng_pktbuf/ng_pktbuf.c index 00f78fd11e..bd0ef0950c 100644 --- a/sys/net/crosslayer/ng_pktbuf/ng_pktbuf.c +++ b/sys/net/crosslayer/ng_pktbuf/ng_pktbuf.c @@ -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);