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/help.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/help.c')
| -rw-r--r-- | src/nvim/help.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/help.c b/src/nvim/help.c index 8930f74e7f..cdd930203f 100644 --- a/src/nvim/help.c +++ b/src/nvim/help.c @@ -591,7 +591,7 @@ void cleanup_help_tags(int num_file, char **file)        for (j = 0; j < num_file; j++) {          if (j != i              && (int)strlen(file[j]) == len + 3 -            && STRNCMP(file[i], file[j], len + 1) == 0) { +            && strncmp(file[i], file[j], (size_t)len + 1) == 0) {            break;          }        } @@ -1041,7 +1041,7 @@ static void helptags_one(char *dir, const char *ext, const char *tagfname, bool      // Write the tags into the file.      for (int i = 0; i < ga.ga_len; i++) {        s = ((char **)ga.ga_data)[i]; -      if (STRNCMP(s, "help-tags\t", 10) == 0) { +      if (strncmp(s, "help-tags\t", 10) == 0) {          // help-tags entry was added in formatted form          fputs(s, fd_tags);        } else { @@ -1122,7 +1122,7 @@ static void do_helptags(char *dirname, bool add_help_tags, bool ignore_writeerr)      // Did we find this language already?      for (j = 0; j < ga.ga_len; j += 2) { -      if (STRNCMP(lang, ((char_u *)ga.ga_data) + j, 2) == 0) { +      if (strncmp(lang, ((char *)ga.ga_data) + j, 2) == 0) {          break;        }      } @@ -1170,7 +1170,7 @@ void ex_helptags(exarg_T *eap)    bool add_help_tags = false;    // Check for ":helptags ++t {dir}". -  if (STRNCMP(eap->arg, "++t", 3) == 0 && ascii_iswhite(eap->arg[3])) { +  if (strncmp(eap->arg, "++t", 3) == 0 && ascii_iswhite(eap->arg[3])) {      add_help_tags = true;      eap->arg = skipwhite(eap->arg + 3);    }  | 
