mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
refactor: use S_LEN(s) instead of s, n (#29219)
This commit is contained in:
@@ -294,7 +294,7 @@ void ex_profile(exarg_T *eap)
|
||||
int len = (int)(e - eap->arg);
|
||||
e = skipwhite(e);
|
||||
|
||||
if (len == 5 && strncmp(eap->arg, "start", 5) == 0 && *e != NUL) {
|
||||
if (len == 5 && strncmp(eap->arg, S_LEN("start")) == 0 && *e != NUL) {
|
||||
xfree(profile_fname);
|
||||
profile_fname = expand_env_save_opt(e, true);
|
||||
do_profiling = PROF_YES;
|
||||
@@ -369,12 +369,12 @@ void set_context_in_profile_cmd(expand_T *xp, const char *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((end_subcmd - arg == 5 && strncmp(arg, "start", 5) == 0)
|
||||
|| (end_subcmd - arg == 4 && strncmp(arg, "file", 4) == 0)) {
|
||||
if ((end_subcmd - arg == 5 && strncmp(arg, S_LEN("start")) == 0)
|
||||
|| (end_subcmd - arg == 4 && strncmp(arg, S_LEN("file")) == 0)) {
|
||||
xp->xp_context = EXPAND_FILES;
|
||||
xp->xp_pattern = skipwhite(end_subcmd);
|
||||
return;
|
||||
} else if (end_subcmd - arg == 4 && strncmp(arg, "func", 4) == 0) {
|
||||
} else if (end_subcmd - arg == 4 && strncmp(arg, S_LEN("func")) == 0) {
|
||||
xp->xp_context = EXPAND_USER_FUNC;
|
||||
xp->xp_pattern = skipwhite(end_subcmd);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user