[PATCH xserver] rrmonitor: allocate using the correct type

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Wed Jan 31 16:33:48 UTC 2018


Monitor outputs are of type RROutput, not RRCrtc.

(Which are both XID, so this makes no difference in practice, other than
being technically correct.)

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
---
 randr/rrmonitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c
index 3f6e03e7d..1bb5018fe 100644
--- a/randr/rrmonitor.c
+++ b/randr/rrmonitor.c
@@ -92,7 +92,7 @@ RRMonitorSetFromServer(RRCrtcPtr crtc, RRMonitorPtr monitor)
     monitor->name = RRMonitorCrtcName(crtc);
     monitor->pScreen = crtc->pScreen;
     monitor->numOutputs = crtc->numOutputs;
-    monitor->outputs = calloc(crtc->numOutputs, sizeof(RRCrtc));
+    monitor->outputs = calloc(crtc->numOutputs, sizeof(RROutput));
     if (!monitor->outputs)
         return FALSE;
     for (o = 0; o < crtc->numOutputs; o++)
-- 
2.14.1.439.g647b9b4702



More information about the xorg-devel mailing list