From 20ee3b5a4f110f53a73746e18fc0eb0cbbb7845c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 2 Nov 2013 04:32:18 +0100 Subject: Implement the first step towards a more flexible way to support crypto methods --- src/methods/methods.c.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/methods/methods.c.in') diff --git a/src/methods/methods.c.in b/src/methods/methods.c.in index 6931edd..8f5bb10 100644 --- a/src/methods/methods.c.in +++ b/src/methods/methods.c.in @@ -30,13 +30,12 @@ @METHOD_DEFINITIONS@ static const fastd_method_t *const methods[] = { @METHOD_LIST@ - NULL }; const fastd_method_t* fastd_method_get_by_name(const char *name) { - int i; - for (i = 0; methods[i]; i++) { + size_t i; + for (i = 0; i < array_size(methods); i++) { if (!strcmp(methods[i]->name, name)) return methods[i]; } -- cgit v1.2.3