[RFC] Make MAXSCREENS run-time configurable

Tiago Vignatti tiago.vignatti at nokia.com
Tue Apr 6 08:53:54 PDT 2010


On Thu, Apr 01, 2010 at 10:20:10PM +0200, ext R�mi Cardona wrote:
> Le 01/04/2010 18:19, Tiago Vignatti a écrit :
> > Allows MAXSCREENS to be determined at run time instead of compile time, adding
> > a new -maxscreens command line flag.
> 
> [snip]
> 
> There seems to be a lot of busted indentation throughout the patch. But
> if this is just a first review, I won't nitpick :)

...

 
> > @@ -1805,7 +1854,7 @@ int PanoramiXPutImage(ClientPtr client)
> >  
> >  int PanoramiXGetImage(ClientPtr client)
> >  {
> > -    DrawablePtr 	drawables[MAXSCREENS];
> > +    DrawablePtr 	*drawables;
> >      DrawablePtr 	pDraw;
> >      PanoramiXRes	*draw;
> >      xGetImageReply	xgi;
> > @@ -1869,12 +1918,14 @@ int PanoramiXGetImage(ClientPtr client)
> >  	    return(BadMatch);
> >      }
> >  
> > +    MAXSCREENSALLOC_RETURN(drawables, BadAlloc);
> >      drawables[0] = pDraw;
> >      for(i = 1; i < PanoramiXNumScreens; i++) {
> >  	rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
> >  			       DixGetAttrAccess);
> >  	if (rc != Success)
> > -	    return rc;
> > +        MAXSCREENSFREE(drawables);
> > +        return rc;
> >      }
> 
> This hunk is probably missing a pair of curly braces, isn't it?

oh, my bad. Really nice catch Remi!


> The rest looks fine but maybe this could be split in several patches, to
> make reviewing easier?
> 

Seems no one hardly yelled about this RFC. So, I'll take it as a positive
feedback and build a nicer patchset, with proper indentation and for all DDXs.
 

Thanks,
                            Tiago


More information about the xorg-devel mailing list