Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/mtrace Don't use abs on unsigned values.
details: https://anonhg.NetBSD.org/src/rev/ea19a68d5453
branches: trunk
changeset: 327112:ea19a68d5453
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Feb 27 17:43:35 2014 +0000
description:
Don't use abs on unsigned values.
diffstat:
usr.sbin/mtrace/mtrace.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 7fcfd1948b81 -r ea19a68d5453 usr.sbin/mtrace/mtrace.c
--- a/usr.sbin/mtrace/mtrace.c Thu Feb 27 17:43:02 2014 +0000
+++ b/usr.sbin/mtrace/mtrace.c Thu Feb 27 17:43:35 2014 +0000
@@ -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 @@
/* 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;
Home |
Main Index |
Thread Index |
Old Index