summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/intel_video.c6
-rw-r--r--src/legacy/i810/i810_video.c6
-rw-r--r--src/sna/sna_video.c1
3 files changed, 5 insertions, 8 deletions
diff --git a/src/intel_video.c b/src/intel_video.c
index 235845f2..0e9845d7 100644
--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -329,11 +329,9 @@ void I830InitVideo(ScreenPtr screen)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
intel_screen_private *intel = intel_get_screen_private(scrn);
- XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
+ XF86VideoAdaptorPtr *adaptors = NULL, *newAdaptors = NULL;
XF86VideoAdaptorPtr overlayAdaptor = NULL, texturedAdaptor = NULL;
- int num_adaptors;
-
- num_adaptors = xf86XVListGenericAdaptors(scrn, &adaptors);
+ int num_adaptors = xf86XVListGenericAdaptors(scrn, &adaptors);
/* Give our adaptor list enough space for the overlay and/or texture video
* adaptors.
*/
diff --git a/src/legacy/i810/i810_video.c b/src/legacy/i810/i810_video.c
index 440f9f73..56d04a48 100644
--- a/src/legacy/i810/i810_video.c
+++ b/src/legacy/i810/i810_video.c
@@ -155,10 +155,8 @@ static Atom xvBrightness, xvContrast, xvColorKey;
void I810InitVideo(ScreenPtr screen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
- XF86VideoAdaptorPtr *adaptors;
- int num_adaptors;
-
- num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
+ XF86VideoAdaptorPtr *adaptors = NULL;
+ int num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
if (pScrn->bitsPerPixel != 8) {
XF86VideoAdaptorPtr newAdaptor;
diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c
index 69995489..08b848b3 100644
--- a/src/sna/sna_video.c
+++ b/src/sna/sna_video.c
@@ -538,6 +538,7 @@ void sna_video_init(struct sna *sna, ScreenPtr screen)
if (!xf86LoaderCheckSymbol("xf86XVListGenericAdaptors"))
return;
+ adaptors = NULL;
num_adaptors = xf86XVListGenericAdaptors(sna->scrn, &adaptors);
newAdaptors = realloc(adaptors,
(num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr));