Also make use of total_name_len variable for consistency.

Signed-off-by: Emil Velikov <[email protected]>
---
 randr/rrscreen.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index c2a7798..d0ca91e 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -413,8 +413,9 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, 
ScreenPtr pScreen)
         .nbytesNames = total_name_len
     };
 
-    rep.length = (total_crtcs + total_outputs + total_modes * 
bytes_to_int32(SIZEOF(xRRModeInfo)) +
-                  bytes_to_int32(rep.nbytesNames));
+    rep.length = (total_crtcs + total_outputs +
+                  total_modes * bytes_to_int32(SIZEOF(xRRModeInfo)) +
+                  bytes_to_int32(total_name_len));
 
     extraLen = rep.length << 2;
     if (extraLen) {
-- 
2.3.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to