aboutsummaryrefslogtreecommitdiffstats
path: root/src/conftest/hooks/custom_proposal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conftest/hooks/custom_proposal.c')
-rw-r--r--src/conftest/hooks/custom_proposal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/conftest/hooks/custom_proposal.c b/src/conftest/hooks/custom_proposal.c
index 38d4286c4..6086d13b5 100644
--- a/src/conftest/hooks/custom_proposal.c
+++ b/src/conftest/hooks/custom_proposal.c
@@ -79,8 +79,7 @@ static linked_list_t* load_proposals(private_custom_proposal_t *this,
type = strtoul(key, &end, 10);
if (end == key || errno)
{
- type = enum_from_name(transform_type_names, key);
- if (type == -1)
+ if (!enum_from_name(transform_type_names, key, &type))
{
DBG1(DBG_CFG, "unknown transform: '%s', skipped", key);
continue;