From fa39a18664d163342429a2b323ad0156896079ff Mon Sep 17 00:00:00 2001 From: George Wang Date: Tue, 16 Aug 2022 14:39:07 -0400 Subject: [PATCH] Release 3.1.2 --- src/liblsquic/lsquic_stock_shi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/liblsquic/lsquic_stock_shi.c b/src/liblsquic/lsquic_stock_shi.c index e04cdb5a9..bd3474935 100644 --- a/src/liblsquic/lsquic_stock_shi.c +++ b/src/liblsquic/lsquic_stock_shi.c @@ -91,11 +91,11 @@ stock_shi_insert (void *hash_ctx, void *key, unsigned key_sz, lsquic_malo_put(he); return -1; } - memmove((char *)(he->key.buf), (char *)key, key_sz); + memmove(he->key.buf, key, key_sz); ((char *)(he->key.buf))[key_sz] = 0; he->key.sz = key_sz; - he->data = he->key.buf + he->key.sz + 1; - memmove((char *)(he->data), (char *)data, data_sz); + he->data = (char *)he->key.buf + he->key.sz + 1; + memmove(he->data, data, data_sz); he->data_sz = data_sz; he->expiry = expiry; memset(&he->lhash_elem, 0, sizeof(he->lhash_elem));