diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-10 04:33:52 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-10 04:33:52 +0800 |
commit | 5af17add039df5d82353326cad378da8bf2556ff (patch) | |
tree | 557059751043dfde17c11505f969546ea0ab4450 | |
parent | 44aafbbb3e463ec686d1bac7b3f0707d905d010e (diff) | |
download | pttbbs-5af17add039df5d82353326cad378da8bf2556ff.tar pttbbs-5af17add039df5d82353326cad378da8bf2556ff.tar.gz pttbbs-5af17add039df5d82353326cad378da8bf2556ff.tar.bz2 pttbbs-5af17add039df5d82353326cad378da8bf2556ff.tar.lz pttbbs-5af17add039df5d82353326cad378da8bf2556ff.tar.xz pttbbs-5af17add039df5d82353326cad378da8bf2556ff.tar.zst pttbbs-5af17add039df5d82353326cad378da8bf2556ff.zip |
no warning
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@95 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/cache.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 <stdio.h> #include <stdlib.h> #include <string.h> @@ -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; |