diff --git a/src/ebusd/mainloop.cpp b/src/ebusd/mainloop.cpp index ab0880a4..9313b7fd 100644 --- a/src/ebusd/mainloop.cpp +++ b/src/ebusd/mainloop.cpp @@ -750,11 +750,9 @@ string MainLoop::executeFind(vector &args) " -c CIRCUIT limit to messages of CIRCUIT (or a part thereof without '-e')\n" " NAME the NAME of the messages to find (or a part thereof without '-e')"; - deque messages; - if (args.size() == argPos) - messages = m_messages->findAll(circuit, "", pb, exact, withRead, withWrite, withPassive); - else - messages = m_messages->findAll(circuit, args[argPos], pb, exact, withRead, withWrite, withPassive); + deque messages = m_messages->findAll( + circuit, args.size() == argPos ? "" : args[argPos], pb, exact, withRead, withWrite, withPassive + ); bool found = false; ostringstream result; @@ -771,7 +769,7 @@ string MainLoop::executeFind(vector &args) } else if (!columns.empty()) { if (found) result << endl; - message->dump(result, columns); + message->dump(result, &columns); } else { if (found) result << endl;