diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-14 10:01:17 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-14 18:44:20 +1100 |
commit | 95e26884a85118713faea943115dd003d2442dd5 (patch) | |
tree | adef4e2270bd228cc97d7ad5c5e63cb6779bdadb /source3/modules/vfs_dirsort.c | |
parent | 8120bc2ba957fa78e04f6f5fc257c91a7f735e82 (diff) | |
download | samba-95e26884a85118713faea943115dd003d2442dd5.tar.gz samba-95e26884a85118713faea943115dd003d2442dd5.tar.bz2 samba-95e26884a85118713faea943115dd003d2442dd5.zip |
s3-vfs: use TYPESAFE_QSORT() in s3 VFS modules
Diffstat (limited to 'source3/modules/vfs_dirsort.c')
-rw-r--r-- | source3/modules/vfs_dirsort.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c index c2053e14e6..d96aca0cb1 100644 --- a/source3/modules/vfs_dirsort.c +++ b/source3/modules/vfs_dirsort.c @@ -20,9 +20,8 @@ #include "includes.h" -static int compare_dirent (const void *a, const void *b) { - const SMB_STRUCT_DIRENT *da = (const SMB_STRUCT_DIRENT *) a; - const SMB_STRUCT_DIRENT *db = (const SMB_STRUCT_DIRENT *) b; +static int compare_dirent (const SMB_STRUCT_DIRENT *da, const SMB_STRUCT_DIRENT *db) +{ return StrCaseCmp(da->d_name, db->d_name); } @@ -81,8 +80,7 @@ static void open_and_sort_dir (vfs_handle_struct *handle) /* Sort the directory entries by name */ data->pos = current_pos; - qsort(data->directory_list, data->number_of_entries, - sizeof(SMB_STRUCT_DIRENT), compare_dirent); + TYPESAFE_QSORT(data->directory_list, data->number_of_entries, compare_dirent); } static SMB_STRUCT_DIR *dirsort_opendir(vfs_handle_struct *handle, |