Skip to content

Commit 2b6cf57

Browse files
author
Fabrice Bellard
committed
removed unused slack in hash_map_resize() (saghul)
1 parent 083b7ba commit 2b6cf57

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

quickjs.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46898,7 +46898,6 @@ static JSMapRecord *map_find_record(JSContext *ctx, JSMapState *s,
4689846898
static void map_hash_resize(JSContext *ctx, JSMapState *s)
4689946899
{
4690046900
uint32_t new_hash_size, h;
46901-
size_t slack;
4690246901
struct list_head *el;
4690346902
JSMapRecord *mr, **new_hash_table;
4690446903

@@ -46907,8 +46906,8 @@ static void map_hash_resize(JSContext *ctx, JSMapState *s)
4690746906
new_hash_size = 4;
4690846907
else
4690946908
new_hash_size = s->hash_size * 2;
46910-
new_hash_table = js_realloc2(ctx, s->hash_table,
46911-
sizeof(new_hash_table[0]) * new_hash_size, &slack);
46909+
new_hash_table = js_realloc(ctx, s->hash_table,
46910+
sizeof(new_hash_table[0]) * new_hash_size);
4691246911
if (!new_hash_table)
4691346912
return;
4691446913

0 commit comments

Comments
 (0)