This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Remove unused struct serial::name field
- From: Pedro Alves <palves at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 12 Apr 2016 16:10:16 -0000
- Subject: [binutils-gdb] Remove unused struct serial::name field
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5f5219fc34f7557296272230123a3837960a6f09
commit 5f5219fc34f7557296272230123a3837960a6f09
Author: Pedro Alves <palves@redhat.com>
Date: Tue Apr 12 16:49:30 2016 +0100
Remove unused struct serial::name field
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.
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/serial.c | 5 -----
gdb/serial.h | 1 -
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cbee808..b77e5e4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
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):
Delete.
(async_remote_fileio_interrupt): Delete.
diff --git a/gdb/serial.c b/gdb/serial.c
index 19b1c2f..5d242b9 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -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;
diff --git a/gdb/serial.h b/gdb/serial.h
index 495b04d..b339f66 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -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. */