contstification
[exim.git] / src / src / lookups / cdb.c
index fda14fbd9108dc3d9db8858f3047789a2c1361f7..4ff42ab3e69154ae57cec6ac5893c06430bfeacb 100644 (file)
@@ -18,6 +18,9 @@
  *   Changed over to using unsigned chars
  *   Makes use of lf_check_file() for file checking
  * --------------------------------------------------------------
+ * Modified by The Exim Maintainers 2015:
+ *   const propagation
+ * --------------------------------------------------------------
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -91,7 +94,7 @@ typedef unsigned int uint32;
  * Internal function to make hash value */
 
 static uint32
-cdb_hash(uschar *buf, unsigned int len)
+cdb_hash(const uschar *buf, unsigned int len)
 {
   uint32 h;
 
@@ -272,11 +275,11 @@ cdb_check(void *handle,
 static int
 cdb_find(void *handle,
         uschar *filename,
-        uschar *keystring,
+        const uschar *keystring,
         int  key_len,
         uschar **result,
         uschar **errmsg,
-        BOOL *do_cache)
+        uint *do_cache)
 {
   struct cdb_state * cdbp = handle;
   uint32 item_key_len,
@@ -295,7 +298,7 @@ cdb_find(void *handle,
   /* Keep picky compilers happy */
   do_cache = do_cache;
 
-  key_hash = cdb_hash((uschar *)keystring, key_len);
+  key_hash = cdb_hash(keystring, key_len);
 
   hash_offset_entry = CDB_HASH_ENTRY * (key_hash & CDB_HASH_MASK);
   hash_offset = cdb_unpack(cdbp->cdb_offsets + hash_offset_entry);