[Tarantool-patches] [PATCH v5 51/52] sql: introduce mem_get_bytes_len()
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Wed Apr 14 02:06:53 MSK 2021
Good job on the patch!
> diff --git a/src/box/sql/func.c b/src/box/sql/func.c
> index 2896a5c31..746bda0f4 100644
> --- a/src/box/sql/func.c
> +++ b/src/box/sql/func.c
> @@ -65,6 +65,14 @@ mem_as_bin(struct Mem *mem)
> return s;
> }
>
> +static int
> +mem_get_length(struct Mem *mem)
> +{
> + uint32_t len;
> + mem_get_bytes_len(mem, &len);
mem_get_bytes_len() is never used except here. I suggest you to
rename it to mem_len(), drop mem_get_length(), and use mem_len()
everywhere.
Since you ignore the error always, it probably must has 'unsafe'
suffix to emphasize it is broken.
More information about the Tarantool-patches
mailing list