Mark bunch of misc. tables & such read-only in librpmio

This commit is contained in:
Panu Matilainen 2008-03-06 19:27:19 +02:00
parent 17fc6663ef
commit 8fde231cac
4 changed files with 6 additions and 6 deletions

View 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 (lenp) *lenp = (2*digestlen) + 1;
if (datap) { if (datap) {
const uint8_t * s = (const uint8_t *) digest; 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); *datap = t = xmalloc((2*digestlen) + 1);
for (i = 0 ; i < digestlen; i++) { for (i = 0 ; i < digestlen; i++) {

View File

@ -216,7 +216,7 @@ void fdstat_exit(FD_t fd, int opx, ssize_t rc)
static inline static inline
void fdstat_print(FD_t fd, const char * msg, FILE * fp) 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; int opx;
if (fd == NULL || fd->stats == NULL) return; if (fd == NULL || fd->stats == NULL) return;

View File

@ -143,7 +143,7 @@ FILE * rpmlogSetFile(FILE * fp)
return ofp; return ofp;
} }
static const char *rpmlogMsgPrefix[] = { static const char * const rpmlogMsgPrefix[] = {
N_("fatal error: "),/*!< RPMLOG_EMERG */ N_("fatal error: "),/*!< RPMLOG_EMERG */
N_("fatal error: "),/*!< RPMLOG_ALERT */ N_("fatal error: "),/*!< RPMLOG_ALERT */
N_("fatal error: "),/*!< RPMLOG_CRIT */ N_("fatal error: "),/*!< RPMLOG_CRIT */

View File

@ -66,9 +66,9 @@ urlinfo urlFree(urlinfo u)
/** /**
*/ */
static struct urlstring { static struct urlstring {
const char * leadin; const char const * leadin;
urltype ret; urltype ret;
} urlstrings[] = { } const urlstrings[] = {
{ "file://", URL_IS_PATH }, { "file://", URL_IS_PATH },
{ "ftp://", URL_IS_FTP }, { "ftp://", URL_IS_FTP },
{ "hkp://", URL_IS_HKP }, { "hkp://", URL_IS_HKP },
@ -80,7 +80,7 @@ static struct urlstring {
urltype urlIsURL(const char * url) urltype urlIsURL(const char * url)
{ {
struct urlstring *us; const struct urlstring *us;
if (url && *url) { if (url && *url) {
for (us = urlstrings; us->leadin != NULL; us++) { for (us = urlstrings; us->leadin != NULL; us++) {