Skip to content

Commit

Permalink
Reduce scope of variable
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Koenig <[email protected]>
  • Loading branch information
knggk committed Jul 3, 2024
1 parent da095ac commit 581fdbe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/rax.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,10 @@ int raxGenericInsert(rax *rax, unsigned char *s, size_t len, void *data, void **
* our key. We have just to reallocate the node and make space for the
* data pointer. */
if (i == len && (!h->iscompr || j == 0 /* not in the middle if j is 0 */)) {
size_t oldalloc = 0;

debugf("### Insert: node representing key exists\n");
/* Make space for the value pointer if needed. */
if (!h->iskey || (h->isnull && overwrite)) {
oldalloc = rax_alloc_size(h);
size_t oldalloc = rax_alloc_size(h);
h = raxReallocForData(h, data);
if (h) {
memcpy(parentlink, &h, sizeof(h));
Expand Down

0 comments on commit 581fdbe

Please sign in to comment.