From 75552ab845005d5b386d4c1383d9c10193168847 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 20 Jul 2009 13:19:36 -0400 Subject: dirent: push dirent type to prototypes This syncs the dirent related functions with the glibc behavior -- rather than take void pointers everywhere, make the struct dirent pointers explicit in the API. After all, the functions themselves will cast the pointers to a dirent structure, so if it isn't as expected, people will crash. Signed-off-by: Mike Frysinger --- libc/misc/dirent/versionsort64.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libc/misc/dirent/versionsort64.c') diff --git a/libc/misc/dirent/versionsort64.c b/libc/misc/dirent/versionsort64.c index 684a46283..af9689eab 100644 --- a/libc/misc/dirent/versionsort64.c +++ b/libc/misc/dirent/versionsort64.c @@ -10,8 +10,7 @@ #include #include "dirstream.h" -int versionsort64(const void *a, const void *b) +int versionsort64(const struct dirent64 **a, const struct dirent64 **b) { - return strverscmp((*(const struct dirent64 **) a)->d_name, - (*(const struct dirent64 **) b)->d_name); + return strverscmp((*a)->d_name, (*b)->d_name); } -- cgit v1.2.3