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.
This commit is contained in:
Andre Brait committed 2026-10-28 11:08:54 +01:00
1 parent 7ca4d2c8dc
commit e8431999e5
1 file changed
+6 -12
+6 -12
View File
@@ -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(']');
}