diff --git a/common/JackClient.cpp b/common/JackClient.cpp index 8ca7e1ec..87e546ef 100644 --- a/common/JackClient.cpp +++ b/common/JackClient.cpp @@ -28,6 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "JackTransportEngine.h" #include #include +#include using namespace std; @@ -405,9 +406,7 @@ int JackClient::PortRegister(const char* port_name, const char* port_type, unsig int JackClient::PortUnRegister(jack_port_id_t port_index) { JackLog("JackClient::PortUnRegister port_index = %ld\n", port_index); - list::iterator it; - for (it = fPortList.begin(); it != fPortList.end() && *it != port_index; it++) - ; + list::iterator it = find(fPortList.begin(), fPortList.end(), port_index); if (it != fPortList.end()) { fPortList.erase(it); diff --git a/example-clients/lsp.c b/example-clients/lsp.c index bf208b64..b949db71 100644 --- a/example-clients/lsp.c +++ b/example-clients/lsp.c @@ -48,7 +48,7 @@ main (int argc, char *argv[]) int show_properties = 0; int show_type = 0; int c; - int option_index; + int option_index; jack_port_t *port; struct option long_options[] = { @@ -169,7 +169,7 @@ main (int argc, char *argv[]) if (show_type) { if (port) { putc ('\t', stdout); - //fputs (port->type_info->type_name, stdout); + fputs (jack_port_type (port), stdout); putc ('\n', stdout); } }