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:
Eliseo Martínez
2014-04-25 12:59:27 +02:00
committed by Thiago de Arruda
parent b8520b8ee4
commit e194324885
7 changed files with 16 additions and 16 deletions

View File

@@ -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;