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/optionstr.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/optionstr.c')
| -rw-r--r-- | src/nvim/optionstr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index 5b17ec7ca8..61a51532a4 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -550,7 +550,7 @@ static int check_signcolumn(char *val) // check for 'auto:<NUMBER>-<NUMBER>' if (strlen(val) == 8 - && !STRNCMP(val, "auto:", 5) + && !strncmp(val, "auto:", 5) && ascii_isdigit(val[5]) && val[6] == '-' && ascii_isdigit(val[7])) { @@ -1609,7 +1609,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf char *q = curwin->w_s->b_p_spl; // Skip the first name if it is "cjk". - if (STRNCMP(q, "cjk,", 4) == 0) { + if (strncmp(q, "cjk,", 4) == 0) { q += 4; } @@ -1678,7 +1678,7 @@ static int opt_strings_flags(char *val, char **values, unsigned *flagp, bool lis } size_t len = strlen(values[i]); - if (STRNCMP(values[i], val, len) == 0 + if (strncmp(values[i], val, len) == 0 && ((list && val[len] == ',') || val[len] == NUL)) { val += len + (val[len] == ','); assert(i < sizeof(1U) * 8); |
