Mark bunch of misc. tables & such read-only in librpmio
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 6 Mar 2008 17:27:19 +0000 (19:27 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 6 Mar 2008 17:27:19 +0000 (19:27 +0200)
rpmio/digest.c
rpmio/rpmio_internal.h
rpmio/rpmlog.c
rpmio/url.c

index e4ae249..5becb6e 100644 (file)
@@ -147,7 +147,7 @@ DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, l
        if (lenp) *lenp = (2*digestlen) + 1;
        if (datap) {
            const uint8_t * s = (const uint8_t *) digest;
-           static const char hex[] = "0123456789abcdef";
+           static const char const hex[] = "0123456789abcdef";
 
            *datap = t = xmalloc((2*digestlen) + 1);
            for (i = 0 ; i < digestlen; i++) {
index b516f20..81006c0 100644 (file)
@@ -216,7 +216,7 @@ void fdstat_exit(FD_t fd, int opx, ssize_t rc)
 static inline
 void fdstat_print(FD_t fd, const char * msg, FILE * fp)
 {
-    static int usec_scale = (1000*1000);
+    static const int usec_scale = (1000*1000);
     int opx;
 
     if (fd == NULL || fd->stats == NULL) return;
index 87ecdb1..cb3ef85 100644 (file)
@@ -143,7 +143,7 @@ FILE * rpmlogSetFile(FILE * fp)
     return ofp;
 }
 
-static const char *rpmlogMsgPrefix[] = {
+static const char * const rpmlogMsgPrefix[] = {
     N_("fatal error: "),/*!< RPMLOG_EMERG */
     N_("fatal error: "),/*!< RPMLOG_ALERT */
     N_("fatal error: "),/*!< RPMLOG_CRIT */
index 4ce8adf..23536f1 100644 (file)
@@ -66,9 +66,9 @@ urlinfo urlFree(urlinfo u)
 /**
  */
 static struct urlstring {
-    const char * leadin;
+    const char const * leadin;
     urltype    ret;
-} urlstrings[] = {
+} const urlstrings[] = {
     { "file://",       URL_IS_PATH },
     { "ftp://",                URL_IS_FTP },
     { "hkp://",                URL_IS_HKP },
@@ -80,7 +80,7 @@ static struct urlstring {
 
 urltype urlIsURL(const char * url)
 {
-    struct urlstring *us;
+    const struct urlstring *us;
 
     if (url && *url) {
        for (us = urlstrings; us->leadin != NULL; us++) {