*: Fix linter errors

This commit is contained in:
ZyX
2017-12-11 10:19:20 +03:00
parent d46e37cb4c
commit f4132fb38b
8 changed files with 29 additions and 25 deletions

View File

@@ -60,7 +60,7 @@ static inline void create_special_dict(typval_T *const rettv,
dictitem_T *const type_di = tv_dict_item_alloc_len(S_LEN("_TYPE"));
type_di->di_tv.v_type = VAR_LIST;
type_di->di_tv.v_lock = VAR_UNLOCKED;
type_di->di_tv.vval.v_list = (list_T *) eval_msgpack_type_lists[type];
type_di->di_tv.vval.v_list = (list_T *)eval_msgpack_type_lists[type];
tv_list_ref(type_di->di_tv.vval.v_list);
tv_dict_add(dict, type_di);
dictitem_T *const val_di = tv_dict_item_alloc_len(S_LEN("_VAL"));

View File

@@ -267,7 +267,7 @@ int encode_read_from_list(ListReaderState *const state, char *const buf,
}
*p++ = NL;
if (TV_LIST_ITEM_TV(state->li)->v_type != VAR_STRING) {
*read_bytes = (size_t) (p - buf);
*read_bytes = (size_t)(p - buf);
return FAIL;
}
state->offset = 0;

View File

@@ -696,8 +696,8 @@ bool tv_list_equal(list_T *const l1, list_T *const l2, const bool ic,
listitem_T *item1 = tv_list_first(l1);
listitem_T *item2 = tv_list_first(l2);
for (; item1 != NULL && item2 != NULL
; item1 = TV_LIST_ITEM_NEXT(l1, item1),
item2 = TV_LIST_ITEM_NEXT(n2, item2)) {
; (item1 = TV_LIST_ITEM_NEXT(l1, item1),
item2 = TV_LIST_ITEM_NEXT(n2, item2))) {
if (!tv_equal(TV_LIST_ITEM_TV(item1), TV_LIST_ITEM_TV(item2), ic,
recursive)) {
return false;

View File

@@ -586,9 +586,10 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
}
size_t len;
char *buf;
if (!encode_vim_list_to_buf(
TV_LIST_ITEM_TV(tv_list_last(val_list))->vval.v_list, &len,
&buf)) {
if (!(
encode_vim_list_to_buf(
TV_LIST_ITEM_TV(tv_list_last(val_list))->vval.v_list, &len,
&buf))) {
goto _convert_one_value_regular_dict;
}
TYPVAL_ENCODE_CONV_EXT_STRING(tv, buf, len, type);
@@ -721,7 +722,8 @@ typval_encode_stop_converting_one_item:
TV_LIST_ITEM_TV(cur_mpsv->data.l.li)->vval.v_list);
TYPVAL_ENCODE_SPECIAL_DICT_KEY_CHECK(
encode_vim_to__error_ret, *TV_LIST_ITEM_TV(tv_list_first(kv_pair)));
if (_TYPVAL_ENCODE_CONVERT_ONE_VALUE(
if (
_TYPVAL_ENCODE_CONVERT_ONE_VALUE(
TYPVAL_ENCODE_FIRST_ARG_NAME, &mpstack, cur_mpsv,
TV_LIST_ITEM_TV(tv_list_first(kv_pair)), copyID, objname)
== FAIL) {