]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Darwin: fix bad loop incrementation
authorXavier Roirand <roirand@adacore.com>
Thu, 23 Aug 2018 15:17:03 +0000 (11:17 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Thu, 23 Aug 2018 15:17:15 +0000 (11:17 -0400)
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
gdb/machoread.c

index 61b4e29a80f68b1a01e878b640c8244c96b5fe18..cdc31f8ca7b76dc3c33549cc49df6c068416e79e 100644 (file)
@@ -1,3 +1,8 @@
+2018-08-23  Xavier Roirand  <roirand@adacore.com>
+
+       * machoread.c (macho_symfile_read_all_oso): Remove uneeded
+       incrementation.
+
 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * solib-svr4.c (read_program_headers_from_bfd): Return
index 0cbd209893e8dc9c88cb76e159463d1c6322e603..3040fe7741b91b0bf4bb3a3bd8297c94c76310f7 100644 (file)
@@ -615,7 +615,7 @@ macho_symfile_read_all_oso (std::vector<oso_el> *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;