summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-03-06 19:50:41 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-03-06 19:50:41 +0200
commit146f12c05beff77c5e1a19989448ca3d12446a06 (patch)
tree2ed3ffff2a67bc48970c9bc049fc898a7080e2e8
parent27f5763cfeb155450b6edf9a3e5dafce07024b99 (diff)
downloadlibrpm-tizen-146f12c05beff77c5e1a19989448ca3d12446a06.tar.gz
librpm-tizen-146f12c05beff77c5e1a19989448ca3d12446a06.tar.bz2
librpm-tizen-146f12c05beff77c5e1a19989448ca3d12446a06.zip
Mark various header tables and definitions as read-only
-rw-r--r--rpmdb/header.c8
-rw-r--r--rpmdb/header_internal.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/rpmdb/header.c b/rpmdb/header.c
index ecc24e010..c69717af1 100644
--- a/rpmdb/header.c
+++ b/rpmdb/header.c
@@ -26,14 +26,14 @@ int _hdr_debug = 0;
/** \ingroup header
*/
-static unsigned char header_magic[8] = {
+static unsigned char const header_magic[8] = {
0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00
};
/** \ingroup header
* Alignment needed for header data types.
*/
-static int typeAlign[16] = {
+static const int typeAlign[16] = {
1, /*!< RPM_NULL_TYPE */
1, /*!< RPM_CHAR_TYPE */
1, /*!< RPM_INT8_TYPE */
@@ -55,7 +55,7 @@ static int typeAlign[16] = {
/** \ingroup header
* Size of header data types.
*/
-static int typeSizes[16] = {
+static const int typeSizes[16] = {
0, /*!< RPM_NULL_TYPE */
1, /*!< RPM_CHAR_TYPE */
1, /*!< RPM_INT8_TYPE */
@@ -77,7 +77,7 @@ static int typeSizes[16] = {
/** \ingroup header
* Maximum no. of bytes permitted in a header.
*/
-static size_t headerMaxbytes = (32*1024*1024);
+static const size_t headerMaxbytes = (32*1024*1024);
/**
* Sanity check on no. of tags.
diff --git a/rpmdb/header_internal.c b/rpmdb/header_internal.c
index 2cbb712c0..b438bdd49 100644
--- a/rpmdb/header_internal.c
+++ b/rpmdb/header_internal.c
@@ -170,7 +170,7 @@ void headerDump(Header h, FILE *f, int flags,
char * bin2hex(const char *data, size_t size)
{
- static char hex[] = "0123456789abcdef";
+ static char const hex[] = "0123456789abcdef";
const char * s = data;
char * t, * val;
val = t = xmalloc(size * 2 + 1);