mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #11161 from miri64/gnrc_pktbuf/fix/start-write-size-0
gnrc_pktbuf: allow write-protect of size 0 snips
This commit is contained in:
commit
db589365f0
@ -232,7 +232,7 @@ void gnrc_pktbuf_release_error(gnrc_pktsnip_t *pkt, uint32_t err)
|
||||
gnrc_pktsnip_t *gnrc_pktbuf_start_write(gnrc_pktsnip_t *pkt)
|
||||
{
|
||||
mutex_lock(&_mutex);
|
||||
if ((pkt == NULL) || (pkt->size == 0)) {
|
||||
if (pkt == NULL) {
|
||||
mutex_unlock(&_mutex);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ void gnrc_pktbuf_release_error(gnrc_pktsnip_t *pkt, uint32_t err)
|
||||
gnrc_pktsnip_t *gnrc_pktbuf_start_write(gnrc_pktsnip_t *pkt)
|
||||
{
|
||||
mutex_lock(&_mutex);
|
||||
if ((pkt == NULL) || (pkt->size == 0)) {
|
||||
if (pkt == NULL) {
|
||||
mutex_unlock(&_mutex);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user