summaryrefslogtreecommitdiff
path: root/randr/rroutput.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-06 12:24:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-14 10:14:01 +1000
commit86b239ff9c4d01685c357ca2b1ef761d167e3224 (patch)
tree59ee2462a0132037df8d634644c7c866f98a4266 /randr/rroutput.c
parent7b9e84e320a6f6449fe7bc58a8d6a094ae37b86c (diff)
randr: switch to byte counting functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'randr/rroutput.c')
-rw-r--r--randr/rroutput.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 127497eb8..2eff8c183 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -455,7 +455,7 @@ ProcRRGetOutputInfo (ClientPtr client)
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
- rep.length = OutputInfoExtra >> 2;
+ rep.length = bytes_to_int32(OutputInfoExtra);
rep.timestamp = pScrPriv->lastSetTime.milliseconds;
rep.crtc = output->crtc ? output->crtc->id : None;
rep.mmWidth = output->mmWidth;
@@ -468,14 +468,14 @@ ProcRRGetOutputInfo (ClientPtr client)
rep.nClones = output->numClones;
rep.nameLength = output->nameLength;
- extraLen = ((output->numCrtcs +
+ extraLen = ((output->numCrtcs +
output->numModes + output->numUserModes +
output->numClones +
- ((rep.nameLength + 3) >> 2)) << 2);
+ bytes_to_int32(rep.nameLength)) << 2);
if (extraLen)
{
- rep.length += extraLen >> 2;
+ rep.length += bytes_to_int32(extraLen);
extra = xalloc (extraLen);
if (!extra)
return BadAlloc;