diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-29 12:50:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 12:50:22 +0200 |
commit | 5fe6bde296569e275a0b83d497a54611f73c410a (patch) | |
tree | 51931728be1890c53597595aeec0826b12b74202 /src/nvim/indent.c | |
parent | f05cc672e3b617b4480d8e2d7efc7e00863efc3d (diff) | |
parent | 691f4715c0cf4bc11ea2280db8777e6dd174a8ac (diff) | |
download | rneovim-5fe6bde296569e275a0b83d497a54611f73c410a.tar.gz rneovim-5fe6bde296569e275a0b83d497a54611f73c410a.tar.bz2 rneovim-5fe6bde296569e275a0b83d497a54611f73c410a.zip |
Merge pull request #19961 from dundargoc/refactor/char_u/2
refactor: replace char_u with char 2: electric chaaralo
Diffstat (limited to 'src/nvim/indent.c')
-rw-r--r-- | src/nvim/indent.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c index 8aa8492dae..c983de6d5e 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -34,12 +34,13 @@ /// Set the integer values corresponding to the string setting of 'vartabstop'. /// "array" will be set, caller must free it if needed. -/// Return false for an error. -bool tabstop_set(char_u *var, long **array) +/// +/// @return false for an error. +bool tabstop_set(char *var, long **array) { long valcount = 1; int t; - char_u *cp; + char *cp; if (var[0] == NUL || (var[0] == '0' && var[1] == NUL)) { *array = NULL; @@ -50,8 +51,8 @@ bool tabstop_set(char_u *var, long **array) if (cp == var || cp[-1] == ',') { char *end; - if (strtol((char *)cp, &end, 10) <= 0) { - if (cp != (char_u *)end) { + if (strtol(cp, &end, 10) <= 0) { + if (cp != end) { emsg(_(e_positive)); } else { semsg(_(e_invarg2), cp); @@ -76,7 +77,7 @@ bool tabstop_set(char_u *var, long **array) t = 1; for (cp = var; *cp != NUL;) { - int n = atoi((char *)cp); + int n = atoi(cp); // Catch negative values, overflow and ridiculous big values. if (n <= 0 || n > TABSTOP_MAX) { |