1
0
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:
Semjon Kerner 2019-03-15 15:10:59 +01:00 committed by GitHub
commit db589365f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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