aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/version.c')
-rw-r--r--src/nvim/version.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c
index dd583f6ffd..f1d39b8492 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -73,7 +73,7 @@ static char *features[] = {
};
// clang-format off
-static int included_patches[] = {
+static const int included_patches[] = {
// 2367,NA
// 2366 NA
// 2365 NA
@@ -2461,10 +2461,10 @@ static char *(extra_patches[]) = {
/// @param version Version string like "1.3.42"
///
/// @return true if Nvim is at or above the version.
-bool has_nvim_version(char *version_str)
- FUNC_ATTR_NONNULL_ALL
+bool has_nvim_version(const char *const version_str)
+ FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
{
- char *p = version_str;
+ const char *p = version_str;
int major = 0;
int minor = 0;
int patch = 0;
@@ -2473,7 +2473,7 @@ bool has_nvim_version(char *version_str)
return false;
}
major = atoi(p);
- p = strchr(p, '.'); // Find the next dot.
+ p = strchr(p, '.'); // Find the next dot.
if (p) {
p++; // Advance past the dot.
@@ -2481,7 +2481,7 @@ bool has_nvim_version(char *version_str)
return false;
}
minor = atoi(p);
- p = strchr(p, '.');
+ p = strchr(p, '.');
if (p) {
p++;
if (!ascii_isdigit(*p)) {