uint32 i;
if (!the_acl) return;
- qsort(the_acl->aces, the_acl->num_aces, sizeof(the_acl->aces[0]), QSORT_CAST ace_compare);
+ TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces, ace_compare);
for (i=1;i<the_acl->num_aces;) {
if (sec_ace_equal(&the_acl->aces[i-1], &the_acl->aces[i])) {
uint32 i;
if (!the_acl) return;
- qsort(the_acl->aces, the_acl->num_aces, sizeof(the_acl->aces[0]), QSORT_CAST ace_compare);
+ TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces, ace_compare);
for (i=1;i<the_acl->num_aces;) {
if (sec_ace_equal(&the_acl->aces[i-1], &the_acl->aces[i])) {
char *string;
};
-static int qsort_cmp_list(const void *x, const void *y) {
- struct pri_list *a = (struct pri_list *)x;
- struct pri_list *b = (struct pri_list *)y;
+static int qsort_cmp_list(struct pri_list *a, struct pri_list *b)
+{
if (a->pri > b->pri) return -1;
if (a->pri < b->pri) return 1;
return 0;
}
TALLOC_FREE(lang_list);
- qsort(pl, lang_num, sizeof(struct pri_list), &qsort_cmp_list);
+ TYPESAFE_QSORT(pl, lang_num, qsort_cmp_list);
/* it's not an error to not initialise - we just fall back to
the default */