aboutsummaryrefslogtreecommitdiff
path: root/lib/libdevstat
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-04-09 07:49:15 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-04-09 07:49:15 +0000
commit1455c4e2ec2d517b95dbed6b0c22b34067914870 (patch)
tree4a5de4bff5273222f56d6e6cee6a89e15857c613 /lib/libdevstat
parenta3d266d5939a403a79f9b2002c7420fad3334448 (diff)
downloadsrc-1455c4e2ec2d517b95dbed6b0c22b34067914870.tar.gz
src-1455c4e2ec2d517b95dbed6b0c22b34067914870.zip
Notes
Diffstat (limited to 'lib/libdevstat')
-rw-r--r--lib/libdevstat/devstat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libdevstat/devstat.c b/lib/libdevstat/devstat.c
index bfc032c7df83..93cb0cb3a822 100644
--- a/lib/libdevstat/devstat.c
+++ b/lib/libdevstat/devstat.c
@@ -1512,6 +1512,8 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
*destld = 0;
*destld /= etime;
*destld *= 100;
+ if (*destld < 0)
+ *destld = 0;
break;
case DSM_QUEUE_LENGTH:
*destu64 = current->start_count - current->end_count;