From d7001336c38bb9516645bbc0fd07a8c7f1f8b3f8 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Wed, 3 Jul 2019 10:07:29 +0300 Subject: dict.c: dict_unserialize() can use dict_addn() Since we know the keylen, we can use dict_addn() instead of dict_add(). Change-Id: Iebe77faa1a20ec132cba5fb85b3d2ea63339181d updates: bz#1193929 Signed-off-by: Yaniv Kaul --- libglusterfs/src/dict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c index b44dda33f00..12184f03343 100644 --- a/libglusterfs/src/dict.c +++ b/libglusterfs/src/dict.c @@ -3193,7 +3193,7 @@ dict_unserialize(char *orig_buf, int32_t size, dict_t **fill) value->is_static = _gf_false; buf += vallen; - ret = dict_add(*fill, key, value); + ret = dict_addn(*fill, key, keylen, value); if (ret < 0) goto out; } -- cgit