some const fixes and cleanup
[openssl.git] / crypto / objects / o_names.c
index 28c9370ca3c2772747c9c5b2d28e98834531c883..adb5731f7659f52e3c0de19af53a26e4fee4bb4e 100644 (file)
@@ -111,8 +111,8 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
 static int obj_name_cmp(const void *a_void, const void *b_void)
        {
        int ret;
-       OBJ_NAME *a = (OBJ_NAME *)a_void;
-       OBJ_NAME *b = (OBJ_NAME *)b_void;
+       const OBJ_NAME *a = (const OBJ_NAME *)a_void;
+       const OBJ_NAME *b = (const OBJ_NAME *)b_void;
 
        ret=a->type-b->type;
        if (ret == 0)
@@ -133,7 +133,7 @@ static int obj_name_cmp(const void *a_void, const void *b_void)
 static unsigned long obj_name_hash(const void *a_void)
        {
        unsigned long ret;
-       OBJ_NAME *a = (OBJ_NAME *)a_void;
+       const OBJ_NAME *a = (const OBJ_NAME *)a_void;
 
        if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type))
                {