aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/record
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
commitd1e4f4b8546c7955c66dd023bfd6ef437db9d21d (patch)
tree529985e77bfc95aa95fe5b540e8f42b0ef041206 /xorg-server/record
parent13919cf85a6ca41d97238de13344aba59e0f7680 (diff)
parent4c61bf84b11e26e6f22648668c95ea760a379163 (diff)
downloadvcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.gz
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.bz2
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/record')
-rw-r--r--xorg-server/record/record.c27
-rw-r--r--xorg-server/record/set.c2
2 files changed, 14 insertions, 15 deletions
diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c
index a2698d1f3..17159fca4 100644
--- a/xorg-server/record/record.c
+++ b/xorg-server/record/record.c
@@ -43,6 +43,7 @@ and Jim Haggerty of Metheus.
#include "swaprep.h"
#include "inputstr.h"
#include "eventconvert.h"
+#include "scrnintstr.h"
#include <stdio.h>
@@ -166,8 +167,8 @@ typedef struct {
ProcFunctionPtr recordVector[256];
} RecordClientPrivateRec, *RecordClientPrivatePtr;
-static int RecordClientPrivateKeyIndex;
-static DevPrivateKey RecordClientPrivateKey = &RecordClientPrivateKeyIndex;
+static DevPrivateKeyRec RecordClientPrivateKeyRec;
+#define RecordClientPrivateKey (&RecordClientPrivateKeyRec)
/* RecordClientPrivatePtr RecordClientPrivate(ClientPtr)
* gets the client private of the given client. Syntactic sugar.
@@ -755,11 +756,11 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP,
int scr = XineramaGetCursorScreen(inputInfo.pointer);
memcpy(&shiftedEvent, pev, sizeof(xEvent));
shiftedEvent.u.keyButtonPointer.rootX +=
- panoramiXdataPtr[scr].x -
- panoramiXdataPtr[0].x;
+ screenInfo.screens[scr]->x -
+ screenInfo.screens[0]->x;
shiftedEvent.u.keyButtonPointer.rootY +=
- panoramiXdataPtr[scr].y -
- panoramiXdataPtr[0].y;
+ screenInfo.screens[scr]->y -
+ screenInfo.screens[0]->y;
pEvToRecord = &shiftedEvent;
}
#endif /* PANORAMIX */
@@ -1494,7 +1495,7 @@ RecordAllocIntervals(SetInfoPtr psi, int nIntervals)
malloc(nIntervals * sizeof(RecordSetInterval));
if (!psi->intervals)
return BadAlloc;
- bzero(psi->intervals, nIntervals * sizeof(RecordSetInterval));
+ memset(psi->intervals, 0, nIntervals * sizeof(RecordSetInterval));
psi->size = nIntervals;
return Success;
} /* end RecordAllocIntervals */
@@ -1668,7 +1669,7 @@ RecordRegisterClients(RecordContextPtr pContext, ClientPtr client, xRecordRegist
err = BadAlloc;
goto bailout;
}
- bzero(si, sizeof(SetInfoRec) * maxSets);
+ memset(si, 0, sizeof(SetInfoRec) * maxSets);
/* theoretically you must do this because NULL may not be all-bits-zero */
for (i = 0; i < maxSets; i++)
@@ -1867,8 +1868,7 @@ bailout:
if (si)
{
for (i = 0; i < maxSets; i++)
- if (si[i].intervals)
- free(si[i].intervals);
+ free(si[i].intervals);
free(si);
}
if (pCanonClients && pCanonClients != (XID *)&stuff[1])
@@ -1954,8 +1954,7 @@ ProcRecordCreateContext(ClientPtr client)
err = BadAlloc;
}
bailout:
- if (pContext)
- free(pContext);
+ free(pContext);
return err;
} /* ProcRecordCreateContext */
@@ -2052,7 +2051,7 @@ RecordAllocRanges(GetContextRangeInfoPtr pri, int nRanges)
pri->pRanges = pNewRange;
pri->size = newsize;
- bzero(&pri->pRanges[pri->size - SZINCR], SZINCR * sizeof(xRecordRange));
+ memset(&pri->pRanges[pri->size - SZINCR], 0, SZINCR * sizeof(xRecordRange));
if (pri->nRanges < nRanges)
pri->nRanges = nRanges;
return Success;
@@ -2351,7 +2350,7 @@ ProcRecordGetContext(ClientPtr client)
bailout:
for (i = 0; i < nRCAPs; i++)
{
- if (pRangeInfo[i].pRanges) free(pRangeInfo[i].pRanges);
+ free(pRangeInfo[i].pRanges);
}
free(pRangeInfo);
return err;
diff --git a/xorg-server/record/set.c b/xorg-server/record/set.c
index 12f0d1267..d4bb4f2cc 100644
--- a/xorg-server/record/set.c
+++ b/xorg-server/record/set.c
@@ -360,7 +360,7 @@ IntervalListCreateSet(RecordSetInterval *pIntervals, int nIntervals,
memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval));
prls->nIntervals = nIntervals;
bailout:
- if (stackIntervals) free(stackIntervals);
+ free(stackIntervals);
return (RecordSetPtr)prls;
}