Further constants made readonly...
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 7 Mar 2008 06:29:03 +0000 (08:29 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 7 Mar 2008 06:29:03 +0000 (08:29 +0200)
lib/depends.c
lib/misc.c
lib/psm.c
lib/rpmlib.h

index 3eae65e..5465c36 100644 (file)
@@ -34,11 +34,11 @@ struct orderListIndex_s {
 
 static int _cacheDependsRC = 1;
 
-const char *rpmNAME = PACKAGE;
+const char * const rpmNAME = PACKAGE;
 
-const char *rpmEVR = VERSION;
+const char * const rpmEVR = VERSION;
 
-int rpmFLAGS = RPMSENSE_EQUAL;
+const int rpmFLAGS = RPMSENSE_EQUAL;
 
 /* rpmlib provides */
 static rpmds rpmlibP = NULL;
index 786e5b2..14b5ae4 100644 (file)
@@ -5,7 +5,7 @@
 #include "system.h"
 
 /* just to put a marker in librpm.a */
-const char * RPMVERSION = VERSION;
+const char * const RPMVERSION = VERSION;
 
 #include <rpm/rpmurl.h>
 #include <rpm/rpmmacro.h>      /* XXX for rpmGetPath */
index 3a00084..a1fafd8 100644 (file)
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -432,7 +432,7 @@ exit:
     return rpmrc;
 }
 
-static const char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
+static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
 
 /**
  * Return scriptlet name from tag.
index f0df328..c7bea3d 100644 (file)
@@ -23,13 +23,13 @@ extern struct rpmMacroContext_s * rpmGlobalMacroContext;
 
 extern struct rpmMacroContext_s * rpmCLIMacroContext;
 
-extern const char * RPMVERSION;
+extern const char * const RPMVERSION;
 
-extern const char * rpmNAME;
+extern const char * const rpmNAME;
 
-extern const char * rpmEVR;
+extern const char * const rpmEVR;
 
-extern int rpmFLAGS;
+extern const int rpmFLAGS;
 
 /** \ingroup header
  * Translate and merge legacy signature tags into header.