eval: Fix max_min functions

Found two bugs:

1. Multiple unneeded error messages, vim/vim#1039.
2. Unformatted error string, vim/vim#1040.
This commit is contained in:
ZyX
2016-09-04 18:40:19 +03:00
parent c4fe656fef
commit 86fc4580b8
3 changed files with 89 additions and 42 deletions

View File

@@ -279,13 +279,13 @@ typedef struct list_stack_S {
#define TV_DICT_HI2DI(hi) \
((dictitem_T *)((hi)->hi_key - offsetof(dictitem_T, di_key)))
static inline long tv_list_len(list_T *const l)
static inline long tv_list_len(const list_T *const l)
REAL_FATTR_PURE REAL_FATTR_WARN_UNUSED_RESULT;
/// Get the number of items in a list
///
/// @param[in] l List to check.
static inline long tv_list_len(list_T *const l)
static inline long tv_list_len(const list_T *const l)
{
if (l == NULL) {
return 0;