Use C99 designated initializers in extension Events
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
committed by
Keith Packard
parent
0af79b124e
commit
9805cedf7b
18
Xext/sync.c
18
Xext/sync.c
@@ -437,9 +437,16 @@ SyncSendAlarmNotifyEvents(SyncAlarm * pAlarm)
|
||||
|
||||
UpdateCurrentTime();
|
||||
|
||||
ane.type = SyncEventBase + XSyncAlarmNotify;
|
||||
ane.kind = XSyncAlarmNotify;
|
||||
ane.alarm = pAlarm->alarm_id;
|
||||
ane = (xSyncAlarmNotifyEvent) {
|
||||
.type = SyncEventBase + XSyncAlarmNotify,
|
||||
.kind = XSyncAlarmNotify,
|
||||
.alarm = pAlarm->alarm_id,
|
||||
.alarm_value_hi = XSyncValueHigh32(pTrigger->test_value),
|
||||
.alarm_value_lo = XSyncValueLow32(pTrigger->test_value),
|
||||
.time = currentTime.milliseconds,
|
||||
.state = pAlarm->state
|
||||
};
|
||||
|
||||
if (pTrigger->pSync && SYNC_COUNTER == pTrigger->pSync->type) {
|
||||
ane.counter_value_hi = XSyncValueHigh32(pCounter->value);
|
||||
ane.counter_value_lo = XSyncValueLow32(pCounter->value);
|
||||
@@ -449,11 +456,6 @@ SyncSendAlarmNotifyEvents(SyncAlarm * pAlarm)
|
||||
ane.counter_value_hi = ane.counter_value_lo = 0;
|
||||
}
|
||||
|
||||
ane.alarm_value_hi = XSyncValueHigh32(pTrigger->test_value);
|
||||
ane.alarm_value_lo = XSyncValueLow32(pTrigger->test_value);
|
||||
ane.time = currentTime.milliseconds;
|
||||
ane.state = pAlarm->state;
|
||||
|
||||
/* send to owner */
|
||||
if (pAlarm->events)
|
||||
WriteEventsToClient(pAlarm->client, 1, (xEvent *) &ane);
|
||||
|
||||
Reference in New Issue
Block a user