<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 5, 2018 at 3:58 PM, Daniel Stone <span dir="ltr"><<a href="mailto:daniels@collabora.com" target="_blank">daniels@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">drmmode_crtc_set_mode has a loop nested inside another loop, where both<br>
of them were using 'i' as the loop iterator. Rename it to avoid an<br>
infinite loop.<br>
<br>
Signed-off-by: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
Reported-by: Michel Dänzer <<a href="mailto:michel.daenzer@amd.com">michel.daenzer@amd.com</a>><br>
---<br>
hw/xfree86/drivers/<wbr>modesetting/drmmode_display.c | 5 +++--<br>
1 file changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/hw/xfree86/drivers/<wbr>modesetting/drmmode_display.c b/hw/xfree86/drivers/<wbr>modesetting/drmmode_display.c<br>
index 0eacefba2..f5f9fa582 100644<br>
--- a/hw/xfree86/drivers/<wbr>modesetting/drmmode_display.c<br>
+++ b/hw/xfree86/drivers/<wbr>modesetting/drmmode_display.c<br>
@@ -778,12 +778,13 @@ drmmode_crtc_set_mode(<wbr>xf86CrtcPtr crtc, Bool test_only)<br>
drmmode_crtc_private_ptr other_drmmode_crtc = other_crtc->driver_private;<br>
int lost_outputs = 0;<br>
int remaining_outputs = 0;<br>
+ int j;<br>
<br>
if (other_crtc == crtc)<br>
continue;<br>
<br>
- for (i = 0; i < xf86_config->num_output; i++) {<br>
- xf86OutputPtr output = xf86_config->output[i];<br>
+ for (j = 0; i < xf86_config->num_output; j++) {<br></blockquote><div><br></div><div> You mean j < xf86_config->num_output here :)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ xf86OutputPtr output = xf86_config->output[j];<br>
drmmode_output_private_ptr drmmode_output = output->driver_private;<br>
<br>
if (drmmode_output->current_crtc == other_crtc) {<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.17.0<br>
<br>
______________________________<wbr>_________________<br>
<a href="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</a>: X.Org development<br>
Archives: <a href="http://lists.x.org/archives/xorg-devel" rel="noreferrer" target="_blank">http://lists.x.org/archives/<wbr>xorg-devel</a><br>
Info: <a href="https://lists.x.org/mailman/listinfo/xorg-devel" rel="noreferrer" target="_blank">https://lists.x.org/mailman/<wbr>listinfo/xorg-devel</a></font></span></blockquote></div><br></div></div>