Skip to content

Commit 581fdbe

Browse files
committed
Reduce scope of variable
Signed-off-by: Guillaume Koenig <[email protected]>
1 parent da095ac commit 581fdbe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/rax.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,12 +508,10 @@ int raxGenericInsert(rax *rax, unsigned char *s, size_t len, void *data, void **
508508
* our key. We have just to reallocate the node and make space for the
509509
* data pointer. */
510510
if (i == len && (!h->iscompr || j == 0 /* not in the middle if j is 0 */)) {
511-
size_t oldalloc = 0;
512-
513511
debugf("### Insert: node representing key exists\n");
514512
/* Make space for the value pointer if needed. */
515513
if (!h->iskey || (h->isnull && overwrite)) {
516-
oldalloc = rax_alloc_size(h);
514+
size_t oldalloc = rax_alloc_size(h);
517515
h = raxReallocForData(h, data);
518516
if (h) {
519517
memcpy(parentlink, &h, sizeof(h));

0 commit comments

Comments
 (0)