From 5af17add039df5d82353326cad378da8bf2556ff Mon Sep 17 00:00:00 2001 From: in2 Date: Tue, 9 Apr 2002 20:33:52 +0000 Subject: no warning git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@95 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/cache.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/cache.c b/mbbsd/cache.c index ad71d35a..daef6628 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -1,4 +1,4 @@ -/* $Id: cache.c,v 1.7 2002/04/09 20:31:50 in2 Exp $ */ +/* $Id: cache.c,v 1.8 2002/04/09 20:33:52 in2 Exp $ */ #include #include #include @@ -354,9 +354,11 @@ static int cmputmpfive(const void *i, const void *j){ return (*((userinfo_t**)i))->five_tie-(*((userinfo_t**)j))->five_tie; } -static int cmputmpsex(userinfo_t ** i, userinfo_t ** j){ - static int ladyfirst[]={1,0,1,0,1,0,3,3}; - return ladyfirst[(*i)->sex&07]-ladyfirst[(*j)->sex&07]; +static int cmputmpsex(const void *i, const void *j) +{ + static int ladyfirst[]={1,0,1,0,1,0,3,3}; + return ladyfirst[(*(userinfo_t**)i)->sex&07]- + ladyfirst[(*(userinfo_t**)j)->sex&07]; } static int cmputmppid(const void *i, const void *j){ return (*((userinfo_t**)i))->pid-(*((userinfo_t**)j))->pid; -- cgit v1.2.3