Skip to content

Commit 21799f1

Browse files
authored
Merge pull request #329 from msgpack/pz-rmem-alloc-dead-code
Remove dead code in _msgpack_rmem_alloc2
2 parents 51da8d8 + 560730d commit 21799f1

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

ext/msgpack/rmem.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ void* _msgpack_rmem_alloc2(msgpack_rmem_t* pm)
6565
/* allocate new chunk */
6666
c = pm->array_last++;
6767

68-
/* move to head */
69-
msgpack_rmem_chunk_t tmp = pm->head;
70-
pm->head = *c;
71-
*c = tmp;
68+
/* move head to array */
69+
*c = pm->head;
7270

7371
pm->head.mask = 0xffffffff & (~1); /* "& (~1)" means first chunk is already allocated */
7472
pm->head.pages = xmalloc(MSGPACK_RMEM_PAGE_SIZE * 32);

0 commit comments

Comments
 (0)