From 6c30bd85b615dc8de5cc0cbf9bd681916caee405 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 10 May 2014 15:20:53 +0200 Subject: fix compare overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-server/mds-server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mds-server') diff --git a/src/mds-server/mds-server.c b/src/mds-server/mds-server.c index 28fd37f..e63b1af 100644 --- a/src/mds-server/mds-server.c +++ b/src/mds-server/mds-server.c @@ -905,8 +905,8 @@ static int cmp_queued_interception(const void* a, const void* b) { const queued_interception_t* p = b; /* Highest first, so swap them. */ const queued_interception_t* q = a; - int64_t diff = p->priority - q->priority; - return diff < 0 ? -1 : diff > 0 ? 1 : 0; + return p->priority < q->priority ? -1 : + p->priority > q->priority ? 1 : 0; } -- cgit v1.2.3-70-g09d2