From 503a07cab24a1e58099a04970babd2b761469449 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 25 Jul 2010 00:13:27 +0200 Subject: Apply post-1.17.0 fixes Signed-off-by: Denys Vlasenko --- procps/top.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'procps') diff --git a/procps/top.c b/procps/top.c index 04dd82633..ec8437442 100644 --- a/procps/top.c +++ b/procps/top.c @@ -686,10 +686,10 @@ static int topmem_sort(char *a, char *b) n = offsetof(topmem_status_t, vsz) + (sort_field * sizeof(mem_t)); l = *(mem_t*)(a + n); r = *(mem_t*)(b + n); -// if (l == r) { -// l = a->mapped_rw; -// r = b->mapped_rw; -// } + if (l == r) { + l = ((topmem_status_t*)a)->dirty; + r = ((topmem_status_t*)b)->dirty; + } /* We want to avoid unsigned->signed and truncation errors */ /* l>r: -1, l=r: 0, l r) ? -1 : (l != r); -- cgit v1.2.3-55-g6feb