From patchwork Fri Mar 18 19:18:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 11408 Received: (qmail 80283 invoked by alias); 18 Mar 2016 19:27:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 79370 invoked by uid 89); 18 Mar 2016 19:27:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=2717, serial_is_open, debug_p, serial_ops X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 18 Mar 2016 19:27:46 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id C0006711EA for ; Fri, 18 Mar 2016 19:18:40 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2IJIYk4028091 for ; Fri, 18 Mar 2016 15:18:40 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 06/30] Remove unused struct serial::name field Date: Fri, 18 Mar 2016 19:18:10 +0000 Message-Id: <1458328714-4938-7-git-send-email-palves@redhat.com> In-Reply-To: <1458328714-4938-1-git-send-email-palves@redhat.com> References: <1458328714-4938-1-git-send-email-palves@redhat.com> From: Pedro Alves Not used by anything. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * serial.c (serial_open, serial_fdopen_ops, do_serial_close): Remove references to name. * serial.h (struct serial) : Delete. --- gdb/serial.c | 5 ----- gdb/serial.h | 1 - 2 files changed, 6 deletions(-) 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. */