summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dba.c12
-rw-r--r--dbm_map.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/dba.c b/dba.c
index 3db86102..3d43a8e7 100644
--- a/dba.c
+++ b/dba.c
@@ -315,8 +315,8 @@ compare_names(const void *vp1, const void *vp2)
const char *cp1, *cp2;
int diff;
- cp1 = *(char **)vp1;
- cp2 = *(char **)vp2;
+ cp1 = *(const char * const *)vp1;
+ cp2 = *(const char * const *)vp2;
return (diff = *cp2 - *cp1) ? diff :
strcasecmp(cp1 + 1, cp2 + 1);
}
@@ -326,8 +326,8 @@ compare_strings(const void *vp1, const void *vp2)
{
const char *cp1, *cp2;
- cp1 = *(char **)vp1;
- cp2 = *(char **)vp2;
+ cp1 = *(const char * const *)vp1;
+ cp2 = *(const char * const *)vp2;
return strcmp(cp1, cp2);
}
@@ -502,7 +502,7 @@ compare_entries(const void *vp1, const void *vp2)
{
const struct macro_entry *ep1, *ep2;
- ep1 = *(struct macro_entry **)vp1;
- ep2 = *(struct macro_entry **)vp2;
+ ep1 = *(const struct macro_entry * const *)vp1;
+ ep2 = *(const struct macro_entry * const *)vp2;
return strcmp(ep1->value, ep2->value);
}
diff --git a/dbm_map.c b/dbm_map.c
index 0c1f5eeb..75a9c717 100644
--- a/dbm_map.c
+++ b/dbm_map.c
@@ -175,7 +175,7 @@ dbm_getint(int32_t offset)
int32_t
dbm_addr(const void *p)
{
- return htobe32((char *)p - dbm_base);
+ return htobe32((const char *)p - dbm_base);
}
int