Module Name:    src
Committed By:   joerg
Date:           Thu Feb 27 17:43:35 UTC 2014

Modified Files:
        src/usr.sbin/mtrace: mtrace.c

Log Message:
Don't use abs on unsigned values.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/mtrace/mtrace.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/mtrace/mtrace.c
diff -u src/usr.sbin/mtrace/mtrace.c:1.39 src/usr.sbin/mtrace/mtrace.c:1.40
--- src/usr.sbin/mtrace/mtrace.c:1.39	Wed Aug 31 13:32:38 2011
+++ src/usr.sbin/mtrace/mtrace.c	Thu Feb 27 17:43:35 2014
@@ -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, stru
     /* 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;

Reply via email to