From 12a0d0f66172b9504e29000fa4f4e5c34109d6db Mon Sep 17 00:00:00 2001 From: Xavier Roirand Date: Thu, 23 Aug 2018 11:17:03 -0400 Subject: [PATCH] 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 --- gdb/ChangeLog | 5 +++++ gdb/machoread.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 61b4e29a80..cdc31f8ca7 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-22 Simon Marchi * solib-svr4.c (read_program_headers_from_bfd): Return diff --git a/gdb/machoread.c b/gdb/machoread.c index 0cbd209893..3040fe7741 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -615,7 +615,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; -- 2.34.1