s3-locking: convert brlock to TYPESAFE_QSORT()
authorAndrew Tridgell <tridge@samba.org>
Sat, 13 Feb 2010 23:02:35 +0000 (10:02 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sun, 14 Feb 2010 07:44:21 +0000 (18:44 +1100)
source3/locking/brlock.c

index 22c6c9e5b3312655c9412b5294b0271c05965fa0..a90e1fd8d53666f0b15ac3019d28b1a6cdcc7ce6 100644 (file)
@@ -944,7 +944,7 @@ NTSTATUS brl_lock(struct messaging_context *msg_ctx,
 
 #if ZERO_ZERO
        /* sort the lock list */
-       qsort(br_lck->lock_data, (size_t)br_lck->num_locks, sizeof(lock), lock_compare);
+       TYPESAFE_QSORT(br_lck->lock_data, (size_t)br_lck->num_locks, lock_compare);
 #endif
 
        /* If we're returning an error, return who blocked us. */
@@ -2029,8 +2029,7 @@ static void brl_revalidate(struct messaging_context *msg_ctx,
                goto done;
        }
 
-       qsort(state->pids, state->num_pids, sizeof(state->pids[0]),
-             compare_procids);
+       TYPESAFE_QSORT(state->pids, state->num_pids, compare_procids);
 
        ZERO_STRUCT(last_pid);