summaryrefslogtreecommitdiff
path: root/randr/rroutput.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2011-08-04 15:35:41 -0400
committerMatt Turner <mattst88@gmail.com>2011-09-21 17:12:04 -0400
commit2c7c520cfe0df30f4bc3adba59d9c62582823bf8 (patch)
treef47282ce2f815acc691cfe188850adf8d6fbfcc3 /randr/rroutput.c
parentc10bad3d3e8ff1b90014770fd470f9c67263e46f (diff)
Use internal temp variable for swap macros
Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'randr/rroutput.c')
-rw-r--r--randr/rroutput.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 5edeb7dd2..b57be198f 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -447,7 +447,7 @@ ProcRRGetOutputInfo (ClientPtr client)
RRMode *modes;
RROutput *clones;
char *name;
- int i, n;
+ int i;
REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess);
@@ -494,7 +494,7 @@ ProcRRGetOutputInfo (ClientPtr client)
{
crtcs[i] = output->crtcs[i]->id;
if (client->swapped)
- swapl (&crtcs[i], n);
+ swapl(&crtcs[i]);
}
for (i = 0; i < output->numModes + output->numUserModes; i++)
{
@@ -503,26 +503,26 @@ ProcRRGetOutputInfo (ClientPtr client)
else
modes[i] = output->userModes[i - output->numModes]->mode.id;
if (client->swapped)
- swapl (&modes[i], n);
+ swapl(&modes[i]);
}
for (i = 0; i < output->numClones; i++)
{
clones[i] = output->clones[i]->id;
if (client->swapped)
- swapl (&clones[i], n);
+ swapl(&clones[i]);
}
memcpy (name, output->name, output->nameLength);
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.timestamp, n);
- swapl(&rep.crtc, n);
- swapl(&rep.mmWidth, n);
- swapl(&rep.mmHeight, n);
- swaps(&rep.nCrtcs, n);
- swaps(&rep.nModes, n);
- swaps(&rep.nClones, n);
- swaps(&rep.nameLength, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.timestamp);
+ swapl(&rep.crtc);
+ swapl(&rep.mmWidth);
+ swapl(&rep.mmHeight);
+ swaps(&rep.nCrtcs);
+ swaps(&rep.nModes);
+ swaps(&rep.nClones);
+ swaps(&rep.nameLength);
}
WriteToClient(client, sizeof(xRRGetOutputInfoReply), (char *)&rep);
if (extraLen)
@@ -614,9 +614,8 @@ ProcRRGetOutputPrimary(ClientPtr client)
rep.output = primary ? primary->id : None;
if (client->swapped) {
- int n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.output, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.output);
}
WriteToClient(client, sizeof(xRRGetOutputPrimaryReply), &rep);