mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
gdbstub: change send buffer to const char
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
parent
efcfd87b44
commit
e59ab2b3af
1 changed files with 2 additions and 3 deletions
|
|
@ -70,15 +70,14 @@ static int gdb_monitor(FAR struct gdb_state_s *state, FAR const char *cmd)
|
|||
#endif
|
||||
}
|
||||
|
||||
static ssize_t gdb_send(FAR void *priv, FAR void *buf,
|
||||
size_t len)
|
||||
static ssize_t gdb_send(FAR void *priv, FAR const char *buf, size_t len)
|
||||
{
|
||||
int fd = *(FAR int *)priv;
|
||||
size_t i = 0;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
ssize_t ret = write(fd, (FAR char *)buf + i, len - i);
|
||||
ssize_t ret = write(fd, buf + i, len - i);
|
||||
if (ret < 0)
|
||||
{
|
||||
return -errno;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue