From f04d8b9be03fe4f06ded9fb0f7d949ccfa491442 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 25 Jun 2014 03:32:22 +0100 Subject: [PATCH] fix off by one in record find code Signed-off-by: John Crispin --- cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.c b/cache.c index 150fb26..357cadd 100644 --- a/cache.c +++ b/cache.c @@ -167,7 +167,7 @@ cache_record_find(char *record, int type, int port, int rdlength, uint8_t *rdata if (!l) return NULL; - while (l && !avl_is_last(&records, &l->avl) && !strcmp(l->record, record)) { + while (l && !strcmp(l->record, record)) { struct cache_record *r = l; l = avl_next_element(l, avl); -- 2.11.0