Skip to content

Commit

Permalink
gdbstub: change send buffer to const char
Browse files Browse the repository at this point in the history
Signed-off-by: Neo Xu <[email protected]>
  • Loading branch information
XuNeo committed Jan 20, 2025
1 parent 9b6de01 commit 2be3be7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions system/gdbstub/gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2be3be7

Please sign in to comment.