public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: or1k: fix iterator typo when setting up cpus
@ 2022-12-25  7:15 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2022-12-25  7:15 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=46ebce9b9c70c85caa9e4cfb5c19340ccfec38fc

commit 46ebce9b9c70c85caa9e4cfb5c19340ccfec38fc
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Dec 25 00:31:19 2022 -0500

    sim: or1k: fix iterator typo when setting up cpus
    
    This code loops over available cpus with "c", but then looks up the
    cpu with "i".  Fix the typo so the code works correctly with smp.

Diff:
---
 sim/or1k/sim-if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/or1k/sim-if.c b/sim/or1k/sim-if.c
index d698d7035bf..799812bb741 100644
--- a/sim/or1k/sim-if.c
+++ b/sim/or1k/sim-if.c
@@ -244,7 +244,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
   }
 
   /* Do some final OpenRISC sim specific initializations.  */
-  for (c = 0; c < MAX_NR_PROCESSORS; ++c)
+  for (i = 0; i < MAX_NR_PROCESSORS; ++i)
     {
       SIM_CPU *cpu = STATE_CPU (sd, i);
       /* Only needed for profiling, but the structure member is small.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-25  7:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-25  7:15 [binutils-gdb] sim: or1k: fix iterator typo when setting up cpus Michael Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).