缩小变量作用域:消除18处variableScope,声明移入实际使用块

This commit is contained in:
2026-09-01 13:59:44 +08:00
parent f1d5483a49
commit 6307c3f635
9 changed files with 17 additions and 25 deletions
+1 -2
View File
@@ -8,10 +8,9 @@
int lftpd_inet_listen(int port)
{
int retry;
int s;
for (retry = 0; retry < 5; retry++) {
s = net_socket(NET_AF_INET, NET_SOCK_STREAM);
int s = net_socket(NET_AF_INET, NET_SOCK_STREAM);
if (s < 0) {
if (retry == 0) DBG_ERROR("create socket");
vTaskDelay(pdMS_TO_TICKS(500));