diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-06 12:24:27 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-14 10:14:01 +1000 |
commit | 86b239ff9c4d01685c357ca2b1ef761d167e3224 (patch) | |
tree | 59ee2462a0132037df8d634644c7c866f98a4266 /randr/rrproperty.c | |
parent | 7b9e84e320a6f6449fe7bc58a8d6a094ae37b86c (diff) |
randr: switch to byte counting functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'randr/rrproperty.c')
-rw-r--r-- | randr/rrproperty.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/randr/rrproperty.c b/randr/rrproperty.c index 775d9e29f..6187b855f 100644 --- a/randr/rrproperty.c +++ b/randr/rrproperty.c @@ -429,7 +429,7 @@ ProcRRListOutputProperties (ClientPtr client) return(BadAlloc); rep.type = X_Reply; - rep.length = (numProps * sizeof(Atom)) >> 2; + rep.length = bytes_to_int32(numProps * sizeof(Atom)); rep.sequenceNumber = client->sequence; rep.nAtoms = numProps; if (client->swapped) @@ -510,7 +510,7 @@ ProcRRConfigureOutputProperty (ClientPtr client) VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); - num_valid = stuff->length - (sizeof (xRRConfigureOutputPropertyReq) >> 2); + num_valid = stuff->length - bytes_to_int32(sizeof (xRRConfigureOutputPropertyReq)); return RRConfigureOutputProperty (output, stuff->property, stuff->pending, stuff->range, FALSE, num_valid, @@ -544,7 +544,7 @@ ProcRRChangeOutputProperty (ClientPtr client) return BadValue; } len = stuff->nUnits; - if (len > ((0xffffffff - sizeof(xChangePropertyReq)) >> 2)) + if (len > bytes_to_int32((0xffffffff - sizeof(xChangePropertyReq)))) return BadLength; sizeInBytes = format>>3; totalSize = len * sizeInBytes; @@ -708,7 +708,7 @@ ProcRRGetOutputProperty (ClientPtr client) } reply.bytesAfter = n - (ind + len); reply.format = prop_value->format; - reply.length = (len + 3) >> 2; + reply.length = bytes_to_int32(len); if (prop_value->format) reply.nItems = len / (prop_value->format / 8); else |