summaryrefslogtreecommitdiff
path: root/gdb/ser-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ser-base.c')
-rw-r--r--gdb/ser-base.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/ser-base.c b/gdb/ser-base.c
index c602650b2ec..52c57264931 100644
--- a/gdb/ser-base.c
+++ b/gdb/ser-base.c
@@ -440,17 +440,18 @@ ser_base_readchar (struct serial *scb, int timeout)
}
int
-ser_base_write (struct serial *scb, const char *str, int len)
+ser_base_write (struct serial *scb, const void *buf, size_t count)
{
+ const char *str = buf;
int cc;
- while (len > 0)
+ while (count > 0)
{
- cc = scb->ops->write_prim (scb, str, len);
+ cc = scb->ops->write_prim (scb, str, count);
if (cc < 0)
return 1;
- len -= cc;
+ count -= cc;
str += cc;
}
return 0;