Use range-based for loop in remote_add_target_side_commands
authorSimon Marchi <simon.marchi@ericsson.com>
Fri, 3 Mar 2017 17:58:24 +0000 (12:58 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 3 Mar 2017 17:58:24 +0000 (12:58 -0500)
gdb/ChangeLog:

* remote.c (remote_add_target_side_commands): Use range-based
for loop.

gdb/ChangeLog
gdb/remote.c

index 368b24c93ef16aa5bfc1c3b98e3f532b7c5c3c95..ccca5bfbe36b2b776429675e3f7ecb8cafe604c6 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * remote.c (remote_add_target_side_commands): Use range-based
+       for loop.
+
 2017-03-03  Yao Qi  <yao.qi@linaro.org>
 
        PR gdb/21165
index 5da831982344a69d2c97ed01821bdd41d17e1fd1..2f34c4c300f0f529bd726358ff980622459753dd 100644 (file)
@@ -9690,10 +9690,8 @@ remote_add_target_side_commands (struct gdbarch *gdbarch,
 
   /* Concatenate all the agent expressions that are commands into the
      cmds parameter.  */
-  for (int ix = 0; ix < bp_tgt->tcommands.size (); ix++)
+  for (agent_expr *aexpr : bp_tgt->tcommands)
     {
-      struct agent_expr *aexpr = bp_tgt->tcommands[ix];
-
       sprintf (buf, "X%x,", aexpr->len);
       buf += strlen (buf);
       for (int i = 0; i < aexpr->len; ++i)
This page took 0.031384 seconds and 4 git commands to generate.