From d8ac99f59c3d8e499362eeb7d5a8b48f8fb67a17 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Sun, 10 Jun 2018 14:57:44 +0200 Subject: print_version(): const version string pointer --- colorize.c | 2 +- version.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/colorize.c b/colorize.c index d7d014f..58625fb 100644 --- a/colorize.c +++ b/colorize.c @@ -576,7 +576,7 @@ print_version (void) #ifdef HAVE_VERSION # include "version.h" #else - const char *version = NULL; + const char *const version = NULL; #endif const char *version_prefix, *version_string; const char *c_flags, *ld_flags, *cpp_flags; diff --git a/version.pl b/version.pl index 850902e..3b1d403 100755 --- a/version.pl +++ b/version.pl @@ -14,11 +14,11 @@ and system('git ls-files colorize.c --error-unmatch >/dev/null 2>&1') == 0) { if (length $version) { print <<"EOT"; -const char *version = "$version"; +const char *const version = "$version"; EOT } else { print <<'EOT'; -const char *version = NULL; +const char *const version = NULL; EOT } -- cgit v1.2.3