From 8028e078152e4ab7d9d22cbdab56d9f00588574a Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 7 Apr 2011 11:18:35 +0000 Subject: [PATCH] Change comparison to be more paranoid (and perhaps avoid Klocwork false positive). Does not change behaviour. --HG-- extra : convert_revision : 11d5ca4bf2f4197ed2d14b6772a351bcb59f775e --- cli-algo.c | 2 +- svr-algo.c | 2 +- 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; } }