From cd63a9addd6e1114c3524fa041ece560550cfe7b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 10 Nov 2023 08:39:21 +0800 Subject: refactor: change some xstrndup() and xstrnsave() to xmemdupz() (#25959) When the given length is exactly the number of bytes to copy, xmemdupz() makes the intention clearer. --- src/nvim/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/context.c') diff --git a/src/nvim/context.c b/src/nvim/context.c index fe5a49faa2..9b1eee56c5 100644 --- a/src/nvim/context.c +++ b/src/nvim/context.c @@ -330,7 +330,7 @@ static inline msgpack_sbuffer array_to_sbuf(Array array) typval_T list_tv; Error err = ERROR_INIT; - object_to_vim(ARRAY_OBJ(array), &list_tv, &err); + (void)object_to_vim(ARRAY_OBJ(array), &list_tv, &err); if (!encode_vim_list_to_buf(list_tv.vval.v_list, &sbuf.size, &sbuf.data)) { emsg(_("E474: Failed to convert list to msgpack string buffer")); -- cgit