Răsfoiți Sursa

Merge pull request #168 from mysterywolf/master

memcpy memset snprintf sprintf改成rt_xxx
xiangxistu 4 ani în urmă
părinte
comite
50d78ce50b

+ 1 - 1
class/bc28/at_socket_bc28.c

@@ -458,7 +458,7 @@ static int bc28_socket_send(struct at_socket *socket, const char *buff,
 
 
         for (i=0, ind=0; i<cur_pkt_size; i++, ind+=2)
         for (i=0, ind=0; i<cur_pkt_size; i++, ind+=2)
         {
         {
-            sprintf(&hex_data[ind], "%02X", buff[sent_size + i]);
+            rt_sprintf(&hex_data[ind], "%02X", buff[sent_size + i]);
         }
         }
 
 
         switch (type)
         switch (type)

+ 1 - 1
class/mw31/at_socket_mw31.c

@@ -235,7 +235,7 @@ static int mw31_socket_send(struct at_socket *socket, const char *buff, size_t b
             cur_pkt_size = MW31_MODULE_SEND_MAX_SIZE;
             cur_pkt_size = MW31_MODULE_SEND_MAX_SIZE;
         }
         }
 
 
-        sprintf(send_buf, "AT+CIPSEND=%d,%d", device_socket, cur_pkt_size);
+        rt_sprintf(send_buf, "AT+CIPSEND=%d,%d", device_socket, cur_pkt_size);
         /* send the "AT+CIPSEND" commands to AT server than receive the '>' response on the first line */
         /* send the "AT+CIPSEND" commands to AT server than receive the '>' response on the first line */
         at_client_obj_send(device->client, send_buf, strlen(send_buf));
         at_client_obj_send(device->client, send_buf, strlen(send_buf));
 
 

+ 1 - 1
class/n720/at_socket_n720.c

@@ -516,7 +516,7 @@ static void read_ack_func(struct at_client *client, const char *data, rt_size_t
     {
     {
         at_evt_cb_set[AT_SOCKET_EVT_RECV](socket, AT_SOCKET_EVT_RECV, recv_buf, bfsz);
         at_evt_cb_set[AT_SOCKET_EVT_RECV](socket, AT_SOCKET_EVT_RECV, recv_buf, bfsz);
     }
     }
-    
+
     send_net_read(client, device_socket);
     send_net_read(client, device_socket);
 }
 }
 
 

+ 1 - 1
samples/at_sample_client.c

@@ -87,7 +87,7 @@ int at_client_test(int argc, char **argv)
         if (at_resp_parse_line_args(resp, 1, resp_expr, resp_arg) == 1)
         if (at_resp_parse_line_args(resp, 1, resp_expr, resp_arg) == 1)
         {
         {
             LOG_D("Station IP  : %s", resp_arg);
             LOG_D("Station IP  : %s", resp_arg);
-            memset(resp_arg, 0x00, AT_CMD_MAX_LEN);
+            rt_memset(resp_arg, 0x00, AT_CMD_MAX_LEN);
         }
         }
         else
         else
         {
         {