diff options
| author | bfredl <bjorn.linse@gmail.com> | 2022-11-28 18:11:41 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-28 18:11:41 +0100 | 
| commit | ccd17543f32a892814c3d32eb5e979722b843da9 (patch) | |
| tree | f4768eb7d7be52402ccd55e3e4e04aecceab3e42 /src/nvim/eval.c | |
| parent | b2bb3973d9c7f25acfead2718d74fcf5b1e4551e (diff) | |
| parent | 3b96ccf7d35be90e49029dec76344d3d92ad91dc (diff) | |
| download | rneovim-ccd17543f32a892814c3d32eb5e979722b843da9.tar.gz rneovim-ccd17543f32a892814c3d32eb5e979722b843da9.tar.bz2 rneovim-ccd17543f32a892814c3d32eb5e979722b843da9.zip  | |
Merge pull request #21200 from dundargoc/refactor/char_u/15
refactor: replace char_u with char 15 - remove STRNLEN and STRNCPY
Diffstat (limited to 'src/nvim/eval.c')
| -rw-r--r-- | src/nvim/eval.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 005207718b..89fda1d8f5 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2084,7 +2084,7 @@ void del_menutrans_vars(void)  {    hash_lock(&globvarht);    HASHTAB_ITER(&globvarht, hi, { -    if (STRNCMP(hi->hi_key, "menutrans_", 10) == 0) { +    if (strncmp(hi->hi_key, "menutrans_", 10) == 0) {        delete_var(&globvarht, hi);      }    }); @@ -2142,7 +2142,7 @@ char *get_user_var_name(expand_T *xp, int idx)      while (HASHITEM_EMPTY(hi)) {        hi++;      } -    if (STRNCMP("g:", xp->xp_pattern, 2) == 0) { +    if (strncmp("g:", xp->xp_pattern, 2) == 0) {        return cat_prefix_varname('g', hi->hi_key);      }      return hi->hi_key; @@ -3323,7 +3323,7 @@ static int eval_method(char **const arg, typval_T *const rettv, const bool evalu    int len;    char *name = *arg;    char *lua_funcname = NULL; -  if (STRNCMP(name, "v:lua.", 6) == 0) { +  if (strncmp(name, "v:lua.", 6) == 0) {      lua_funcname = name + 6;      *arg = (char *)skip_luafunc_name((const char *)lua_funcname);      *arg = skipwhite(*arg);  // to detect trailing whitespace later @@ -5041,7 +5041,7 @@ void common_function(typval_T *argvars, typval_T *rettv, bool is_funcref)      int dict_idx = 0;      int arg_idx = 0;      list_T *list = NULL; -    if (STRNCMP(s, "s:", 2) == 0 || STRNCMP(s, "<SID>", 5) == 0) { +    if (strncmp(s, "s:", 2) == 0 || strncmp(s, "<SID>", 5) == 0) {        char sid_buf[25];        int off = *s == 's' ? 2 : 5;  | 
