diff options
author | James <89495599+IAKOBVS@users.noreply.github.com> | 2024-06-11 22:40:24 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 16:40:24 +0100 |
commit | c37695a5d5f2e8914fff86f3581bed70b4c85d3c (patch) | |
tree | 89c5f523768f3fe31a938e497fb7ff9657049e4b /src/nvim/regexp.c | |
parent | 44410d063ad23544f87d1c8a553de336ae7939d8 (diff) | |
download | rneovim-c37695a5d5f2e8914fff86f3581bed70b4c85d3c.tar.gz rneovim-c37695a5d5f2e8914fff86f3581bed70b4c85d3c.tar.bz2 rneovim-c37695a5d5f2e8914fff86f3581bed70b4c85d3c.zip |
refactor: use S_LEN(s) instead of s, n (#29219)
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 2ff4dbee70..ad3cce9120 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -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 |