This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/obvious] Update comment on gdb_environ::unset
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Thu, 22 Jun 2017 14:52:13 -0400
- Subject: [commit/obvious] Update comment on gdb_environ::unset
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7708A7F413
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7708A7F413
gdb_environ::unset iterates using '.end () - 1' now, instead of '.cend
() - 1'. This obvious patch updates the comment.
gdb/ChangeLog:
2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
* common/environ.c (gdb_environ::unset): Update comment.
---
gdb/ChangeLog | 4 ++++
gdb/common/environ.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bf9e08d..95010fc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * common/environ.c (gdb_environ::unset): Update comment.
+
2017-06-22 Alan Hayward <alan.hayward@arm.com>
* python/py-unwind.c (pyuw_sniffer): Allocate space for
diff --git a/gdb/common/environ.c b/gdb/common/environ.c
index 2d13957..698bda3 100644
--- a/gdb/common/environ.c
+++ b/gdb/common/environ.c
@@ -114,7 +114,7 @@ gdb_environ::unset (const char *var)
{
size_t len = strlen (var);
- /* We iterate until '.cend () - 1' because the last element is
+ /* We iterate until '.end () - 1' because the last element is
always NULL. */
for (std::vector<char *>::iterator el = m_environ_vector.begin ();
el != m_environ_vector.end () - 1;
--
2.9.3