[PATCH xserver 6/7] sync: Convert from "CARD64" to int64_t.
Keith Packard
keithp at keithp.com
Thu Aug 3 22:08:40 UTC 2017
Eric Anholt <eric at anholt.net> writes:
> Keith Packard <keithp at keithp.com> writes:
>
>> [ Unknown signature status ]
>> Eric Anholt <eric at anholt.net> writes:
>>
>>> The extension was using the name CARD64 to represent 64-bit values,
>>> with a #define from CARD64 to XSyncValue, a struct with a pair of
>>> 32-bit values representing a signed 64-bit value. Now that stdint.h
>>> exists, let's just use that instead.
>>
>> Really, CARD64 was a *signed* value?
>
> Right?!
Wow.
In any case, this sure seems like a fine change
@@ -822,7 +819,7 @@ SyncChangeAlarmAttributes(ClientPtr client, SyncAlarm * pAlarm, Mask mask,
case XSyncCAValue:
mask &= ~XSyncCAValue;
- XSyncIntsToValue(&pAlarm->trigger.wait_value, values[1], values[0]);
+ pAlarm->trigger.wait_value = ((int64_t)values[0] << 32) | values[1];
values += 2;
break;
@@ -834,7 +831,7 @@ SyncChangeAlarmAttributes(ClientPtr client, SyncAlarm * pAlarm, Mask mask,
case XSyncCADelta:
mask &= ~XSyncCADelta;
- XSyncIntsToValue(&pAlarm->delta, values[1], values[0]);
+ pAlarm->delta = ((int64_t)values[1] << 32) | values[0];
values += 2;
break;
These are using the array in a different order; that seems wrong.
I didn't see any other issues of concern.
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170803/3905f0e2/attachment.sig>
More information about the xorg-devel
mailing list