From: Xavier Roirand Date: Thu, 23 Aug 2018 15:17:03 +0000 (-0400) Subject: Darwin: fix bad loop incrementation X-Git-Tag: gdb-8.2-release~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6354b6519382f592c81932631c7d45c61d6ba5b7;p=thirdparty%2Fbinutils-gdb.git Darwin: fix bad loop incrementation When reading symbols from the vector of oso files on Mac OS X Darwin, a previous commit introduce a change in the loop and add an increment at each loop iteration whereas this incrementation is not needed since the increment or set of the loop control variable is already done in the loop. gdb/ChangeLog: * machoread.c (macho_symfile_read_all_oso): Remove uneeded incrementation. Change-Id: I3a5a6deb4e9d834ee7d4217a62d90c2ffb7241bc --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d16950750c6..be849a911fb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-08-23 Xavier Roirand + + * machoread.c (macho_symfile_read_all_oso): Remove uneeded + incrementation. + 2018-08-21 Alan Hayward * arch/aarch64.h (aarch64_regnum): Update comment. diff --git a/gdb/machoread.c b/gdb/machoread.c index 07e1cdaf4f8..62d0fb9d0cc 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -616,7 +616,7 @@ macho_symfile_read_all_oso (std::vector *oso_vector_ptr, std::sort (oso_vector_ptr->begin (), oso_vector_ptr->end (), oso_el_compare_name); - for (ix = 0; ix < oso_vector_ptr->size (); ++ix) + for (ix = 0; ix < oso_vector_ptr->size ();) { int pfx_len;