From 9e72f805168ae60919117c98dc1ab6c7441873ac Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 24 Apr 2017 09:23:17 +0200 Subject: Fix: Avoid returning 2 results for 1 signal. Either returning signal with search against generic_name either against name, not both. Change-Id: I597718d04c99d098973442b4174e735e813c9b94 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/utils/signals.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CAN-binder/low-can-binding/utils/signals.hpp b/CAN-binder/low-can-binding/utils/signals.hpp index d2e9205..2eae7e9 100644 --- a/CAN-binder/low-can-binding/utils/signals.hpp +++ b/CAN-binder/low-can-binding/utils/signals.hpp @@ -61,7 +61,7 @@ namespace utils { if(::fnmatch(key.c_str(), s.get_generic_name().c_str(), FNM_CASEFOLD) == 0) found_signals.push_back(&s); - if(::fnmatch(key.c_str(), s.get_name().c_str(), FNM_CASEFOLD) == 0) + else if(::fnmatch(key.c_str(), s.get_name().c_str(), FNM_CASEFOLD) == 0) found_signals.push_back(&s); } } -- cgit 1.2.3-korg