From 4b57b2ecc8c3caa06b24c851f1d9b738e5729f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Sun, 1 Mar 2009 18:38:34 +0000 Subject: [PATCH] Add an assert to avoid future mistakes --- transports.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transports.c b/transports.c index 7c989ec3..a5b602bd 100644 --- a/transports.c +++ b/transports.c @@ -368,6 +368,8 @@ transport_find(channel_t *ch, unsigned int weight) if(!t->tht_disabled && t->tht_quality_index(t) > 10) vec[i++] = t; + assert(i == cnt); + /* Sort transports, lower priority should come come earlier in the vector (i.e. it will be more favoured when selecting a transport */