diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-13 16:00:07 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-13 16:00:07 +0800 |
commit | 9671494643c68203da5fcf777a3c61720d29000a (patch) | |
tree | bbdcf044d7dcbbd172f6f0a2ed65316e7b981565 /util | |
parent | 8601b22b64b7f524e299773a6915bbedb5f78ab4 (diff) | |
download | pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.gz pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.bz2 pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.lz pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.xz pttbbs-9671494643c68203da5fcf777a3c61720d29000a.tar.zst pttbbs-9671494643c68203da5fcf777a3c61720d29000a.zip |
WARNING: THIS PATCHSET CHANGED SHM STRUCTURE. PLEASE READ UPDATING CAREFULLY.
- (internal) change IP/from sorting mechanism.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4307 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/shmctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/shmctl.c b/util/shmctl.c index 4e8c0ef1..4a1a2a4c 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -280,7 +280,8 @@ cmputmpidle(const void * i, const void * j) static int cmputmpfrom(const void * i, const void * j) { - return strncmp(SHM->uinfo[*(int*)i].from, SHM->uinfo[*(int*)j].from, sizeof(SHM->uinfo[0].from)); + // desc sorted + return -(SHM->uinfo[*(int*)i].from_ip - SHM->uinfo[*(int*)j].from_ip); } static int |