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
|
* mtrace.c
|
||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#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
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#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 */
|
/* Check for byte-swappers */
|
||||||
while (--rno >= 0) {
|
while (--rno >= 0) {
|
||||||
--n; --p; --b; --s;
|
--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 */
|
/* This host sends byteswapped reports; swap 'em */
|
||||||
if (!*s) {
|
if (!*s) {
|
||||||
*s = 1;
|
*s = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user