summaryrefslogtreecommitdiff
path: root/src/conftest/hooks/unsort_message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conftest/hooks/unsort_message.c')
-rw-r--r--src/conftest/hooks/unsort_message.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/conftest/hooks/unsort_message.c b/src/conftest/hooks/unsort_message.c
index 1b2b302af..399d2932a 100644
--- a/src/conftest/hooks/unsort_message.c
+++ b/src/conftest/hooks/unsort_message.c
@@ -69,8 +69,7 @@ METHOD(listener_t, message, bool,
order = enumerator_create_token(this->order, ", ", " ");
while (order->enumerate(order, &name))
{
- type = enum_from_name(payload_type_short_names, name);
- if (type != -1)
+ if (enum_from_name(payload_type_short_names, name, &type))
{
enumerator = list->create_enumerator(list);
while (enumerator->enumerate(enumerator, &payload))