summaryrefslogtreecommitdiffstats
path: root/src/methods/methods.c.in
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 04:32:18 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 04:32:18 +0100
commit20ee3b5a4f110f53a73746e18fc0eb0cbbb7845c (patch)
treebbf62cb65ba716e7cefcfc41904bb3460c3ddb58 /src/methods/methods.c.in
parentde66ca829d22f939900635968d1b3fd7a7d598da (diff)
downloadfastd-20ee3b5a4f110f53a73746e18fc0eb0cbbb7845c.tar
fastd-20ee3b5a4f110f53a73746e18fc0eb0cbbb7845c.zip
Implement the first step towards a more flexible way to support crypto methods
Diffstat (limited to 'src/methods/methods.c.in')
-rw-r--r--src/methods/methods.c.in5
1 files changed, 2 insertions, 3 deletions
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];
}