Sfoglia il codice sorgente

[client] add static.

shandianchengzi 2 anni fa
parent
commit
643a9e8d09
3 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 1 1
      tcpclient_sample.c
  2. 1 1
      tcpclient_select_sample.c
  3. 2 2
      udpclient_sample.c

+ 1 - 1
tcpclient_sample.c

@@ -25,7 +25,7 @@
 #define BUFSZ   1024
 #define BUFSZ   1024
 
 
 static const char send_data[] = "This is TCP Client from RT-Thread."; /* 发送用到的数据 */
 static const char send_data[] = "This is TCP Client from RT-Thread."; /* 发送用到的数据 */
-void tcpclient(int argc, char **argv)
+static void tcpclient(int argc, char **argv)
 {
 {
     int ret;
     int ret;
     char *recv_data;
     char *recv_data;

+ 1 - 1
tcpclient_select_sample.c

@@ -27,7 +27,7 @@
 #define BUFSZ   1024
 #define BUFSZ   1024
 
 
 static const char send_data[] = "This is TCP Client from RT-Thread."; /* 发送用到的数据 */
 static const char send_data[] = "This is TCP Client from RT-Thread."; /* 发送用到的数据 */
-void tcpclient_select(int argc, char **argv)
+static void tcpclient_select(int argc, char **argv)
 {
 {
     int ret;
     int ret;
     char *recv_data;
     char *recv_data;

+ 2 - 2
udpclient_sample.c

@@ -22,8 +22,8 @@
 #include <string.h>
 #include <string.h>
 #include <finsh.h>
 #include <finsh.h>
 
 
-const char send_data[] = "This is UDP Client from RT-Thread.\n"; /* 发送用到的数据 */
-void udpclient(int argc, char **argv)
+static const char send_data[] = "This is UDP Client from RT-Thread.\n"; /* 发送用到的数据 */
+static void udpclient(int argc, char **argv)
 {
 {
     int sock, port, count;
     int sock, port, count;
     struct hostent *host;
     struct hostent *host;