From e8431999e5d695ca178445ad3584ad5482f28323 Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Wed, 28 Oct 2026 11:08:54 +0100 Subject: [PATCH] httpd: close the port arrays after their loops send_lldp(), send_eee(), send_bandwidth(), send_storm(), send_mtu() and send_status() wrote the closing ']' inside the loop, on the last port. Write it once after the loop, as send_isolation() already does, so the array is closed however the loop ends. --- httpd/page_impl.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/httpd/page_impl.c b/httpd/page_impl.c index 7b416fce..12e34eaf 100644 --- a/httpd/page_impl.c +++ b/httpd/page_impl.c @@ -673,9 +673,8 @@ void send_lldp(void) if (i < MACHINE_MAX_PORT) char_to_html(','); - else - char_to_html(']'); } + char_to_html(']'); char_to_html('}'); } @@ -723,9 +722,8 @@ void send_eee(void) char_to_html('}'); if (i < MACHINE_MAX_PORT) char_to_html(','); - else - char_to_html(']'); } + char_to_html(']'); } @@ -766,9 +764,8 @@ void send_bandwidth(void) char_to_html('}'); if (i < MACHINE_MAX_PORT) char_to_html(','); - else - char_to_html(']'); } + char_to_html(']'); } @@ -800,9 +797,8 @@ void send_storm(void) char_to_html('}'); if (i < MACHINE_MAX_PORT) char_to_html(','); - else - char_to_html(']'); } + char_to_html(']'); } @@ -846,9 +842,8 @@ void send_mtu(void) char_to_html('}'); if (i < MACHINE_MAX_PORT) char_to_html(','); - else - char_to_html(']'); } + char_to_html(']'); } @@ -981,9 +976,8 @@ void send_status(void) slen += strtox(outbuf + slen, "\"}"); if (i < MACHINE_MAX_PORT) char_to_html(','); - else - char_to_html(']'); } + char_to_html(']'); }