diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 77001fadfb..f4e2b0823f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-06-20 Sergio Durigan Junior + + * common/environ.c (gdb_environ::unset): Use '::iterator' instead + of '::const_iterator'. + 2017-06-20 Sergio Durigan Junior * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add diff --git a/gdb/common/environ.c b/gdb/common/environ.c index 20f8aba74b..2d1395719b 100644 --- a/gdb/common/environ.c +++ b/gdb/common/environ.c @@ -116,8 +116,8 @@ gdb_environ::unset (const char *var) /* We iterate until '.cend () - 1' because the last element is always NULL. */ - for (std::vector::const_iterator el = m_environ_vector.cbegin (); - el != m_environ_vector.cend () - 1; + for (std::vector::iterator el = m_environ_vector.begin (); + el != m_environ_vector.end () - 1; ++el) if (match_var_in_string (*el, var, len)) {