From: Sergio Durigan Junior Date: Thu, 22 Jun 2017 18:50:24 +0000 (-0400) Subject: Update comment on gdb_environ::unset X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4c6ce5b011b03c7e4a84b530cba1f9b56441131;p=binutils-gdb.git Update comment on gdb_environ::unset 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 * common/environ.c (gdb_environ::unset): Update comment. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bf9e08d1d81..95010fc6129 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-06-22 Sergio Durigan Junior + + * common/environ.c (gdb_environ::unset): Update comment. + 2017-06-22 Alan Hayward * python/py-unwind.c (pyuw_sniffer): Allocate space for diff --git a/gdb/common/environ.c b/gdb/common/environ.c index 2d1395719b7..698bda3ac12 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::iterator el = m_environ_vector.begin (); el != m_environ_vector.end () - 1;