mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
refactor: use S_LEN(s) instead of s, n (#29219)
This commit is contained in:
@@ -11517,7 +11517,7 @@ static void nfa_print_state2(FILE *debugf, nfa_state_T *state, garray_T *indent)
|
||||
uint8_t save[2];
|
||||
|
||||
strncpy(save, &p[last], 2); // NOLINT(runtime/printf)
|
||||
memcpy(&p[last], "+-", 2);
|
||||
memcpy(&p[last], S_LEN("+-"));
|
||||
fprintf(debugf, " %s", p);
|
||||
strncpy(&p[last], save, 2); // NOLINT(runtime/printf)
|
||||
} else {
|
||||
@@ -15932,7 +15932,7 @@ regprog_T *vim_regcomp(const char *expr_arg, int re_flags)
|
||||
regexp_engine = (int)p_re;
|
||||
|
||||
// Check for prefix "\%#=", that sets the regexp engine
|
||||
if (strncmp(expr, "\\%#=", 4) == 0) {
|
||||
if (strncmp(expr, S_LEN("\\%#=")) == 0) {
|
||||
int newengine = expr[4] - '0';
|
||||
|
||||
if (newengine == AUTOMATIC_ENGINE
|
||||
|
Reference in New Issue
Block a user