Remove unused struct serial::name field
authorPedro Alves <palves@redhat.com>
Tue, 12 Apr 2016 15:49:30 +0000 (16:49 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 12 Apr 2016 15:53:01 +0000 (16:53 +0100)
Not used by anything.

gdb/ChangeLog:
2016-04-12  Pedro Alves  <palves@redhat.com>

* serial.c (serial_open, serial_fdopen_ops, do_serial_close):
Remove references to name.
* serial.h (struct serial) <name>: Delete.

gdb/ChangeLog
gdb/serial.c
gdb/serial.h

index cbee808f3d4c329ec8bbd94fd9b2db843b1bb96b..b77e5e4248aa11d32af564fd890f5f815b0d0bca 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+       * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
+       Remove references to name.
+       * serial.h (struct serial) <name>: Delete.
+
 2016-04-12  Pedro Alves  <palves@redhat.com>
 
        * remote-fileio.c (sigint_fileio_token, remote_fio_no_longjmp):
index 19b1c2f7dd2f18f09188042e70aeeed029b84925..5d242b94ac988e7752dc2b57061f21c25a1ef356 100644 (file)
@@ -226,7 +226,6 @@ serial_open (const char *name)
       return NULL;
     }
 
-  scb->name = xstrdup (name);
   scb->next = scb_base;
   scb->debug_p = 0;
   scb->async_state = 0;
@@ -271,7 +270,6 @@ serial_fdopen_ops (const int fd, const struct serial_ops *ops)
   scb->error_fd = -1;
   scb->refcnt = 1;
 
-  scb->name = NULL;
   scb->next = scb_base;
   scb->debug_p = 0;
   scb->async_state = 0;
@@ -315,9 +313,6 @@ do_serial_close (struct serial *scb, int really_close)
   if (really_close)
     scb->ops->close (scb);
 
-  if (scb->name)
-    xfree (scb->name);
-
   /* For serial_is_open.  */
   scb->bufp = NULL;
 
index 495b04d73164f131d4c38eaea7ad7a26a61dd205..b339f6627829ca1882cc98adf8cc1e098be653eb 100644 (file)
@@ -248,7 +248,6 @@ struct serial
     int timeout_remaining;     /* (ser-unix.c termio{,s} only), we
                                   still need to wait for this many
                                   more seconds.  */
-    char *name;                        /* The name of the device or host */
     struct serial *next;       /* Pointer to the next `struct serial *' */
     int debug_p;               /* Trace this serial devices operation.  */
     int async_state;           /* Async internal state.  */
This page took 0.026876 seconds and 4 git commands to generate.