From 4f891c5ec148f0b716af0e6155e20ddec25f0109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Mon, 21 Mar 2022 11:07:35 +0100 Subject: [PATCH] drop unused variable (and fix wrong use) --- comport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comport.c b/comport.c index 9d78c6b..c35da48 100644 --- a/comport.c +++ b/comport.c @@ -1824,7 +1824,7 @@ static void comport_enum(t_comport *x) static void comport_ports(t_comport *x) { /* the same as comport_enum except outputs list of available ports on status outlet */ - unsigned int i, j = 0; + unsigned int i; t_atom output_atom[2]; #ifdef _WIN32 HANDLE fd; @@ -1879,7 +1879,7 @@ static void comport_ports(t_comport *x) break; # endif /* GLOB_NOMATCH */ } - for(i = 0; (i < glob_buffer.gl_pathc) && (j < COMPORT_MAX); i++) + for(i = 0; (i < glob_buffer.gl_pathc) && (i < COMPORT_MAX); i++) { /* now try to open the device */ if((fd = open(glob_buffer.gl_pathv[i], OPENPARAMS)) != INVALID_HANDLE_VALUE)