Don't use abs on unsigned values.
This commit is contained in:
parent
33ddbd4a4d
commit
4f76b089a9
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mtrace.c,v 1.39 2011/08/31 13:32:38 joerg Exp $ */
|
||||
/* $NetBSD: mtrace.c,v 1.40 2014/02/27 17:43:35 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* mtrace.c
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: mtrace.c,v 1.39 2011/08/31 13:32:38 joerg Exp $");
|
||||
__RCSID("$NetBSD: mtrace.c,v 1.40 2014/02/27 17:43:35 joerg Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -978,7 +978,7 @@ fixup_stats(struct resp_buf *basep, struct resp_buf *prev, struct resp_buf *new)
|
||||
/* Check for byte-swappers */
|
||||
while (--rno >= 0) {
|
||||
--n; --p; --b; --s;
|
||||
if (*s || abs(ntohl(n->tr_vifout) - ntohl(p->tr_vifout)) > 100000) {
|
||||
if (*s || (ntohl(n->tr_vifout) - ntohl(p->tr_vifout)) > 100000) {
|
||||
/* This host sends byteswapped reports; swap 'em */
|
||||
if (!*s) {
|
||||
*s = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user