mirror of
https://github.com/neovim/neovim.git
synced 2025-11-16 15:21:20 +00:00
refactor: follow style guide
This commit is contained in:
@@ -105,7 +105,6 @@ static int get_function_args(char **argp, char endchar, garray_T *newargs, int *
|
||||
bool mustend = false;
|
||||
char *arg = *argp;
|
||||
char *p = arg;
|
||||
uint8_t c;
|
||||
|
||||
if (newargs != NULL) {
|
||||
ga_init(newargs, (int)sizeof(char *), 3);
|
||||
@@ -142,7 +141,7 @@ static int get_function_args(char **argp, char endchar, garray_T *newargs, int *
|
||||
}
|
||||
if (newargs != NULL) {
|
||||
ga_grow(newargs, 1);
|
||||
c = (uint8_t)(*p);
|
||||
uint8_t c = (uint8_t)(*p);
|
||||
*p = NUL;
|
||||
arg = xstrdup(arg);
|
||||
|
||||
@@ -173,7 +172,7 @@ static int get_function_args(char **argp, char endchar, garray_T *newargs, int *
|
||||
while (p > expr && ascii_iswhite(p[-1])) {
|
||||
p--;
|
||||
}
|
||||
c = (uint8_t)(*p);
|
||||
uint8_t c = (uint8_t)(*p);
|
||||
*p = NUL;
|
||||
expr = xstrdup(expr);
|
||||
((char **)(default_args->ga_data))[default_args->ga_len] = expr;
|
||||
@@ -325,7 +324,6 @@ int get_lambda_tv(char **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
|
||||
if (evaluate) {
|
||||
int flags = 0;
|
||||
char *p;
|
||||
garray_T newlines;
|
||||
|
||||
char *name = get_lambda_name();
|
||||
@@ -338,7 +336,7 @@ int get_lambda_tv(char **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
|
||||
// Add "return " before the expression.
|
||||
size_t len = (size_t)(7 + end - start + 1);
|
||||
p = xmalloc(len);
|
||||
char *p = xmalloc(len);
|
||||
((char **)(newlines.ga_data))[newlines.ga_len++] = p;
|
||||
STRCPY(p, "return ");
|
||||
xstrlcpy(p + 7, start, (size_t)(end - start) + 1);
|
||||
@@ -918,7 +916,6 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett
|
||||
FUNC_ATTR_NONNULL_ARG(1, 3, 4)
|
||||
{
|
||||
bool using_sandbox = false;
|
||||
int save_did_emsg;
|
||||
static int depth = 0;
|
||||
dictitem_T *v;
|
||||
int fixvar_idx = 0; // index in fc_fixvar[]
|
||||
@@ -1167,7 +1164,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett
|
||||
|
||||
const sctx_T save_current_sctx = current_sctx;
|
||||
current_sctx = fp->uf_script_ctx;
|
||||
save_did_emsg = did_emsg;
|
||||
int save_did_emsg = did_emsg;
|
||||
did_emsg = false;
|
||||
|
||||
if (default_arg_err && (fp->uf_flags & FC_ABORT)) {
|
||||
|
||||
Reference in New Issue
Block a user