r17748: make the casts much easier to understand
authorStefan Metzmacher <metze@samba.org>
Wed, 23 Aug 2006 11:29:08 +0000 (11:29 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:16:36 +0000 (14:16 -0500)
metze

source/lib/ldb/ldb_tdb/ldb_index.c

index c6feeaeb42b96f26706f95089d5fbf5cca69598b..03dfe693ace7f6f002297d694887c42cc260ff87 100644 (file)
@@ -61,11 +61,11 @@ static int ldb_list_find(const void *needle,
                int r;
 
                test_i = (min_i + max_i) / 2;
-               r = comp_fn(needle, *(void * const *)(base_p + (size * test_i)));
+               r = comp_fn(needle, (const void *)(base_p + (size * test_i)));
                if (r == 0) {
                        /* scan back for first element */
                        while (test_i > 0 &&
-                              comp_fn(needle, *(void * const *)(base_p + (size * (test_i-1)))) == 0) {
+                              comp_fn(needle, (const void *)(base_p + (size * (test_i-1)))) == 0) {
                                test_i--;
                        }
                        return test_i;
@@ -81,7 +81,7 @@ static int ldb_list_find(const void *needle,
                }
        }
 
-       if (comp_fn(needle, *(void * const *)(base_p + (size * min_i))) == 0) {
+       if (comp_fn(needle, (const void *)(base_p + (size * min_i))) == 0) {
                return min_i;
        }