]> git.refcnt.org Git - colorize.git/commitdiff
print_version(): const version string pointer
authorSteven Schubiger <stsc@refcnt.org>
Sun, 10 Jun 2018 12:57:44 +0000 (14:57 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Sun, 10 Jun 2018 12:57:44 +0000 (14:57 +0200)
colorize.c
version.pl

index d7d014ffb48f3817624b4e3fdc87531920344020..58625fb56db157019419ed04a50357f2b1c7e10e 100644 (file)
@@ -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;
index 850902eeddad409af4f7d7e0810ec6651a15f0f7..3b1d403e3dbb68eeef176ba24432fa46724e83cb 100755 (executable)
@@ -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
 }