serial_write: change prototype to take a void-pointer buffer.
[deliverable/binutils-gdb.git] / gdb / ser-base.c
index c602650b2ec29c087127bee63faa33fce4d319b5..52c57264931642dcf2ce6b84d84638b91ad310f8 100644 (file)
@@ -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;
This page took 0.024154 seconds and 4 git commands to generate.