From 2c7c520cfe0df30f4bc3adba59d9c62582823bf8 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 4 Aug 2011 15:35:41 -0400 Subject: Use internal temp variable for swap macros Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris Signed-off-by: Matt Turner --- randr/rroutput.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'randr/rroutput.c') 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); -- cgit v1.2.3