Skip to content

Commit 1d36bfb

Browse files
authored
Merge pull request #86 from mysterywolf/master
memcpy改为rt_memcpy
2 parents 686a3ad + 3ad722c commit 1d36bfb

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

inc/webclient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2018, RT-Thread Development Team
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

samples/webclient_get_sample.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2018, RT-Thread Development Team
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -78,7 +78,7 @@ static int webclient_get_comm(const char *uri)
7878

7979
do
8080
{
81-
bytes_read = webclient_read(session, (void *)buffer,
81+
bytes_read = webclient_read(session, (void *)buffer,
8282
content_length - content_pos > GET_RESP_BUFSZ ?
8383
GET_RESP_BUFSZ : content_length - content_pos);
8484
if (bytes_read <= 0)
@@ -131,7 +131,7 @@ static int webclient_get_smpl(const char *uri)
131131
rt_kprintf("%c", response[index]);
132132
}
133133
rt_kprintf("\n");
134-
134+
135135
if (response)
136136
{
137137
web_free(response);
@@ -202,7 +202,7 @@ int webclient_get_test(int argc, char **argv)
202202
{
203203
web_free(uri);
204204
}
205-
205+
206206
return RT_EOK;
207207
}
208208

samples/webclient_post_sample.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2018, RT-Thread Development Team
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -183,7 +183,7 @@ int webclient_post_test(int argc, char **argv)
183183
rt_kprintf("web_post_test -s [uri] - webclient simplify post request test.\n");
184184
return -RT_ERROR;
185185
}
186-
186+
187187
if (uri)
188188
{
189189
web_free(uri);

samples/webclient_shard_download_sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2018, RT-Thread Development Team
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

src/webclient.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2019, RT-Thread Development Team
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -216,11 +216,11 @@ static int webclient_resolve_address(struct webclient_session *session, struct a
216216
port_ptr = rt_strstr(host_addr + host_addr_len, ":");
217217
if (port_ptr && (!path_ptr || (port_ptr < path_ptr)))
218218
{
219-
if (!path_ptr)
219+
if (!path_ptr)
220220
{
221221
rt_strcpy(port_str, port_ptr + 1);
222222
}
223-
else
223+
else
224224
{
225225
int port_len = path_ptr - port_ptr - 1;
226226
rt_strncpy(port_str, port_ptr + 1, port_len);
@@ -270,7 +270,7 @@ static int webclient_resolve_address(struct webclient_session *session, struct a
270270
goto __exit;
271271
}
272272

273-
memcpy(host_addr_new, host_addr, host_addr_len);
273+
rt_memcpy(host_addr_new, host_addr, host_addr_len);
274274
host_addr_new[host_addr_len] = '\0';
275275
session->host = host_addr_new;
276276
}

src/webclient_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2018, RT-Thread Development Team
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

0 commit comments

Comments
 (0)