mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
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:
1 file changed
+6
-12
+6
-12
@@ -673,9 +673,8 @@ void send_lldp(void)
|
|||||||
|
|
||||||
if (i < MACHINE_MAX_PORT)
|
if (i < MACHINE_MAX_PORT)
|
||||||
char_to_html(',');
|
char_to_html(',');
|
||||||
else
|
|
||||||
char_to_html(']');
|
|
||||||
}
|
}
|
||||||
|
char_to_html(']');
|
||||||
char_to_html('}');
|
char_to_html('}');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,9 +722,8 @@ void send_eee(void)
|
|||||||
char_to_html('}');
|
char_to_html('}');
|
||||||
if (i < MACHINE_MAX_PORT)
|
if (i < MACHINE_MAX_PORT)
|
||||||
char_to_html(',');
|
char_to_html(',');
|
||||||
else
|
|
||||||
char_to_html(']');
|
|
||||||
}
|
}
|
||||||
|
char_to_html(']');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -766,9 +764,8 @@ void send_bandwidth(void)
|
|||||||
char_to_html('}');
|
char_to_html('}');
|
||||||
if (i < MACHINE_MAX_PORT)
|
if (i < MACHINE_MAX_PORT)
|
||||||
char_to_html(',');
|
char_to_html(',');
|
||||||
else
|
|
||||||
char_to_html(']');
|
|
||||||
}
|
}
|
||||||
|
char_to_html(']');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -800,9 +797,8 @@ void send_storm(void)
|
|||||||
char_to_html('}');
|
char_to_html('}');
|
||||||
if (i < MACHINE_MAX_PORT)
|
if (i < MACHINE_MAX_PORT)
|
||||||
char_to_html(',');
|
char_to_html(',');
|
||||||
else
|
|
||||||
char_to_html(']');
|
|
||||||
}
|
}
|
||||||
|
char_to_html(']');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -846,9 +842,8 @@ void send_mtu(void)
|
|||||||
char_to_html('}');
|
char_to_html('}');
|
||||||
if (i < MACHINE_MAX_PORT)
|
if (i < MACHINE_MAX_PORT)
|
||||||
char_to_html(',');
|
char_to_html(',');
|
||||||
else
|
|
||||||
char_to_html(']');
|
|
||||||
}
|
}
|
||||||
|
char_to_html(']');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -981,9 +976,8 @@ void send_status(void)
|
|||||||
slen += strtox(outbuf + slen, "\"}");
|
slen += strtox(outbuf + slen, "\"}");
|
||||||
if (i < MACHINE_MAX_PORT)
|
if (i < MACHINE_MAX_PORT)
|
||||||
char_to_html(',');
|
char_to_html(',');
|
||||||
else
|
|
||||||
char_to_html(']');
|
|
||||||
}
|
}
|
||||||
|
char_to_html(']');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user