diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-07-03 10:07:29 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-07-29 04:47:09 +0000 |
commit | d7001336c38bb9516645bbc0fd07a8c7f1f8b3f8 (patch) | |
tree | f51f8d4effd7f33b8181ab6707af631e70a41c0b /libglusterfs/src/dict.c | |
parent | 799edc73c3d4f694c365c6a7c27c9ab8eed5f260 (diff) |
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 <ykaul@redhat.com>
Diffstat (limited to 'libglusterfs/src/dict.c')
-rw-r--r-- | libglusterfs/src/dict.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |