gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / ser-base.c
index 287e55d2af6106e3bfe02f3ce487103dd619bd04..52c57264931642dcf2ce6b84d84638b91ad310f8 100644 (file)
@@ -1,7 +1,6 @@
 /* Generic serial interface functions.
 
-   Copyright (C) 1992-1996, 1998-2001, 2003-2012 Free Software
-   Foundation, Inc.
+   Copyright (C) 1992-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -441,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.037286 seconds and 4 git commands to generate.