summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2011-04-07 11:18:35 +0000
committerMatt Johnston <matt@ucc.asn.au>2011-04-07 11:18:35 +0000
commit4e3c39d055232cee6183f63d746e00f6cd7a74ff (patch)
tree242f0242ec1d95dff8e4b5b387ccbe7bb49c3d38
parentfae213b746483c01d519cac8c5c28ea20a4325f2 (diff)
downloaddropbear-4e3c39d055232cee6183f63d746e00f6cd7a74ff.tar.gz
Change comparison to be more paranoid (and perhaps avoid Klocwork false
positive). Does not change behaviour.
-rw-r--r--cli-algo.c2
-rw-r--r--svr-algo.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cli-algo.c b/cli-algo.c
index ec3a1ff..09da41a 100644
--- a/cli-algo.c
+++ b/cli-algo.c
@@ -67,7 +67,7 @@ algo_type * cli_buf_match_algo(buffer* buf, algo_type localalgos[],
remotealgos[count] = &algolist[i+1];
count++;
}
- if (count == MAX_PROPOSED_ALGO) {
+ if (count >= MAX_PROPOSED_ALGO) {
break;
}
}
diff --git a/svr-algo.c b/svr-algo.c
index c0b7823..f8f9055 100644
--- a/svr-algo.c
+++ b/svr-algo.c
@@ -68,7 +68,7 @@ algo_type * svr_buf_match_algo(buffer* buf, algo_type localalgos[],
remotealgos[count] = &algolist[i+1];
count++;
}
- if (count == MAX_PROPOSED_ALGO) {
+ if (count >= MAX_PROPOSED_ALGO) {
break;
}
}