updates.
[silc.git] / lib / silccrypt / silchash.c
index 138ba09c8f14f2c0dc2e73717a63ce2bec7180c3..5e740df5c9baebe29d528b3997e38ee321dc05f9 100644 (file)
@@ -43,7 +43,7 @@ const SilcHashObject silc_default_hash[] =
 /* Registers a new hash function into the SILC. This function is used at
    the initialization of the SILC. */
 
-bool silc_hash_register(SilcHashObject *hash)
+bool silc_hash_register(const SilcHashObject *hash)
 {
 #ifndef SILC_EPOC
   SilcHashObject *new;
@@ -119,7 +119,7 @@ bool silc_hash_register_default(void)
   int i;
 
   for (i = 0; silc_default_hash[i].name; i++)
-    silc_hash_register((SilcHashObject *)&(silc_default_hash[i]));
+    silc_hash_register(&(silc_default_hash[i]));
 
 #endif /* SILC_EPOC */
   return TRUE;
@@ -160,6 +160,7 @@ bool silc_hash_alloc(const unsigned char *name, SilcHash *new_hash)
     (*new_hash)->hash = entry;
     (*new_hash)->context = silc_calloc(1, entry->context_len());
     (*new_hash)->make_hash = silc_hash_make;
+    return TRUE;
   }
 
   return FALSE;