From bdb91bc49bbb6842995bd5efeae705b15a253b91 Mon Sep 17 00:00:00 2001 From: Richard Nyberg Date: Mon, 4 Jul 2005 15:46:10 +0000 Subject: Sanity checks. --- btpd/net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/btpd/net.c b/btpd/net.c index 903b4df..a226aaf 100644 --- a/btpd/net.c +++ b/btpd/net.c @@ -30,6 +30,7 @@ net_bw_read_cb(int sd, short type, void *arg) struct bwlim *bw = arg; btpd.ibw_left += bw->count; + assert(btpd.ibw_left <= btpd.ibwlim); unsigned long count = 0; @@ -79,6 +80,7 @@ net_bw_write_cb(int sd, short type, void *arg) struct bwlim *bw = arg; btpd.obw_left += bw->count; + assert(btpd.obw_left <= btpd.obwlim); unsigned long count = 0; -- cgit 1.4.1