aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/chgfctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/chgfctl.c')
-rw-r--r--xorg-server/Xi/chgfctl.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/xorg-server/Xi/chgfctl.c b/xorg-server/Xi/chgfctl.c
index 3155e87c2..9189702c1 100644
--- a/xorg-server/Xi/chgfctl.c
+++ b/xorg-server/Xi/chgfctl.c
@@ -50,8 +50,6 @@ SOFTWARE.
*
*/
-#define NEED_EVENTS /* for inputstr.h */
-#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@@ -443,14 +441,14 @@ ProcXChangeFeedbackControl(ClientPtr client)
REQUEST(xChangeFeedbackControlReq);
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
- len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2);
+ len = stuff->length - bytes_to_int32(sizeof(xChangeFeedbackControlReq));
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
if (rc != Success)
return rc;
switch (stuff->feedbackid) {
case KbdFeedbackClass:
- if (len != (sizeof(xKbdFeedbackCtl) >> 2))
+ if (len != bytes_to_int32(sizeof(xKbdFeedbackCtl)))
return BadLength;
for (k = dev->kbdfeed; k; k = k->next)
@@ -459,7 +457,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
(xKbdFeedbackCtl *) & stuff[1]);
break;
case PtrFeedbackClass:
- if (len != (sizeof(xPtrFeedbackCtl) >> 2))
+ if (len != bytes_to_int32(sizeof(xPtrFeedbackCtl)))
return BadLength;
for (p = dev->ptrfeed; p; p = p->next)
@@ -475,7 +473,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
if (client->swapped) {
swaps(&f->num_keysyms, n);
}
- if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms))
+ if (len != (bytes_to_int32(sizeof(xStringFeedbackCtl)) + f->num_keysyms))
return BadLength;
for (s = dev->stringfeed; s; s = s->next)
@@ -485,7 +483,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
break;
}
case IntegerFeedbackClass:
- if (len != (sizeof(xIntegerFeedbackCtl) >> 2))
+ if (len != bytes_to_int32(sizeof(xIntegerFeedbackCtl)))
return BadLength;
for (i = dev->intfeed; i; i = i->next)
@@ -494,7 +492,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
(xIntegerFeedbackCtl *)&stuff[1]);
break;
case LedFeedbackClass:
- if (len != (sizeof(xLedFeedbackCtl) >> 2))
+ if (len != bytes_to_int32(sizeof(xLedFeedbackCtl)))
return BadLength;
for (l = dev->leds; l; l = l->next)
@@ -503,7 +501,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
(xLedFeedbackCtl *) & stuff[1]);
break;
case BellFeedbackClass:
- if (len != (sizeof(xBellFeedbackCtl) >> 2))
+ if (len != bytes_to_int32(sizeof(xBellFeedbackCtl)))
return BadLength;
for (b = dev->bell; b; b = b->next)