aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext')
-rw-r--r--xorg-server/Xext/panoramiX.c14
-rw-r--r--xorg-server/Xext/sync.c13
-rw-r--r--xorg-server/Xext/xvdisp.c8
3 files changed, 19 insertions, 16 deletions
diff --git a/xorg-server/Xext/panoramiX.c b/xorg-server/Xext/panoramiX.c
index be475f7f4..7f888e38d 100644
--- a/xorg-server/Xext/panoramiX.c
+++ b/xorg-server/Xext/panoramiX.c
@@ -596,7 +596,7 @@ Bool
PanoramiXCreateConnectionBlock(void)
{
int i, j, length;
- Bool disableBackingStore = FALSE;
+ Bool disable_backing_store = FALSE;
int old_width, old_height;
float width_mult, height_mult;
xWindowRoot *root;
@@ -622,10 +622,10 @@ PanoramiXCreateConnectionBlock(void)
}
if (pScreen->backingStoreSupport !=
screenInfo.screens[0]->backingStoreSupport)
- disableBackingStore = TRUE;
+ disable_backing_store = TRUE;
}
- if (disableBackingStore) {
+ if (disable_backing_store) {
for (i = 0; i < screenInfo.numScreens; i++) {
pScreen = screenInfo.screens[i];
pScreen->backingStoreSupport = NotUseful;
@@ -831,15 +831,15 @@ PanoramiXConsolidate(void)
saver->type = XRT_WINDOW;
FOR_NSCREENS(i) {
- ScreenPtr pScreen = screenInfo.screens[i];
+ ScreenPtr scr = screenInfo.screens[i];
- root->info[i].id = pScreen->root->drawable.id;
+ root->info[i].id = scr->root->drawable.id;
root->u.win.class = InputOutput;
root->u.win.root = TRUE;
- saver->info[i].id = pScreen->screensaver.wid;
+ saver->info[i].id = scr->screensaver.wid;
saver->u.win.class = InputOutput;
saver->u.win.root = TRUE;
- defmap->info[i].id = pScreen->defColormap;
+ defmap->info[i].id = scr->defColormap;
}
AddResource(root->info[0].id, XRT_WINDOW, root);
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c
index 4d11992bb..9ae5b3981 100644
--- a/xorg-server/Xext/sync.c
+++ b/xorg-server/Xext/sync.c
@@ -2747,7 +2747,6 @@ init_system_idle_counter(const char *name, int deviceid)
{
CARD64 resolution;
XSyncValue idle;
- IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
SyncCounter *idle_time_counter;
IdleTimeQueryValue(NULL, &idle);
@@ -2758,10 +2757,14 @@ init_system_idle_counter(const char *name, int deviceid)
IdleTimeQueryValue,
IdleTimeBracketValues);
- priv->deviceid = deviceid;
- priv->value_less = priv->value_greater = NULL;
+ if (idle_time_counter != NULL) {
+ IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
- idle_time_counter->pSysCounterInfo->private = priv;
+ priv->value_less = priv->value_greater = NULL;
+ priv->deviceid = deviceid;
+
+ idle_time_counter->pSysCounterInfo->private = priv;
+ }
return idle_time_counter;
}
@@ -2786,6 +2789,6 @@ void SyncRemoveDeviceIdleTime(SyncCounter *counter)
/* FreeAllResources() frees all system counters before the devices are
shut down, check if there are any left before freeing the device's
counter */
- if (!xorg_list_is_empty(&SysCounterList))
+ if (counter && !xorg_list_is_empty(&SysCounterList))
xorg_list_del(&counter->pSysCounterInfo->entry);
}
diff --git a/xorg-server/Xext/xvdisp.c b/xorg-server/Xext/xvdisp.c
index 31b77839f..787729387 100644
--- a/xorg-server/Xext/xvdisp.c
+++ b/xorg-server/Xext/xvdisp.c
@@ -702,7 +702,7 @@ ProcXvUngrabPort(ClientPtr client)
static int
ProcXvStopVideo(ClientPtr client)
{
- int status, rc;
+ int status, ret;
DrawablePtr pDraw;
XvPortPtr pPort;
@@ -716,9 +716,9 @@ ProcXvStopVideo(ClientPtr client)
return status;
}
- rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
- if (rc != Success)
- return rc;
+ ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
+ if (ret != Success)
+ return ret;
return XvdiStopVideo(client, pPort, pDraw);
}