mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 06:18:16 +00:00
Use portable format specifiers: Clarify some casted expressions.
Though correct (to my understanding), some of the casts introduced in previous commits could lead to confusion, by casting only the first expression component instead of the whole expression. This fixes that, parenthesizing casted expressions, except where operator precedence rules make it unneccesary.
This commit is contained in:

committed by
Thiago de Arruda

parent
b8520b8ee4
commit
e194324885
@@ -9965,7 +9965,7 @@ static void f_getregtype(typval_T *argvars, typval_T *rettv)
|
||||
case MCHAR: buf[0] = 'v'; break;
|
||||
case MBLOCK:
|
||||
buf[0] = Ctrl_V;
|
||||
sprintf((char *)buf + 1, "%" PRId64, (int64_t)reglen + 1);
|
||||
sprintf((char *)buf + 1, "%" PRId64, (int64_t)(reglen + 1));
|
||||
break;
|
||||
}
|
||||
rettv->v_type = VAR_STRING;
|
||||
|
Reference in New Issue
Block a user