aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/debugger.c
diff options
context:
space:
mode:
authorJames <89495599+IAKOBVS@users.noreply.github.com>2024-06-11 22:40:24 +0700
committerGitHub <noreply@github.com>2024-06-11 16:40:24 +0100
commitc37695a5d5f2e8914fff86f3581bed70b4c85d3c (patch)
tree89c5f523768f3fe31a938e497fb7ff9657049e4b /src/nvim/debugger.c
parent44410d063ad23544f87d1c8a553de336ae7939d8 (diff)
downloadrneovim-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/debugger.c')
-rw-r--r--src/nvim/debugger.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/debugger.c b/src/nvim/debugger.c
index b71ff23f57..ffbeee7f7a 100644
--- a/src/nvim/debugger.c
+++ b/src/nvim/debugger.c
@@ -521,18 +521,18 @@ static int dbg_parsearg(char *arg, garray_T *gap)
struct debuggy *bp = &DEBUGGY(gap, gap->ga_len);
// Find "func" or "file".
- if (strncmp(p, "func", 4) == 0) {
+ if (strncmp(p, S_LEN("func")) == 0) {
bp->dbg_type = DBG_FUNC;
- } else if (strncmp(p, "file", 4) == 0) {
+ } else if (strncmp(p, S_LEN("file")) == 0) {
bp->dbg_type = DBG_FILE;
- } else if (gap != &prof_ga && strncmp(p, "here", 4) == 0) {
+ } else if (gap != &prof_ga && strncmp(p, S_LEN("here")) == 0) {
if (curbuf->b_ffname == NULL) {
emsg(_(e_noname));
return FAIL;
}
bp->dbg_type = DBG_FILE;
here = true;
- } else if (gap != &prof_ga && strncmp(p, "expr", 4) == 0) {
+ } else if (gap != &prof_ga && strncmp(p, S_LEN("expr")) == 0) {
bp->dbg_type = DBG_EXPR;
} else {
semsg(_(e_invarg2), p);
@@ -559,7 +559,7 @@ static int dbg_parsearg(char *arg, garray_T *gap)
}
if (bp->dbg_type == DBG_FUNC) {
- bp->dbg_name = xstrdup(strncmp(p, "g:", 2) == 0 ? p + 2 : p);
+ bp->dbg_name = xstrdup(strncmp(p, S_LEN("g:")) == 0 ? p + 2 : p);
} else if (here) {
bp->dbg_name = xstrdup(curbuf->b_ffname);
} else if (bp->dbg_type == DBG_EXPR) {