summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/shmctl.c3
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