[PATCH 1/3] Delete redundant scrnum field from Xvfb private screen-info struct.
Tiago Vignatti
tiago.vignatti at nokia.com
Tue Apr 27 03:07:02 PDT 2010
On Tue, Apr 27, 2010 at 04:17:10AM +0200, ext Jamey Sharp wrote:
> The screen number can be inferred from the position in the vfbScreens
> array, and it was only used in two places, so it was hardly important.
...
> - sprintf(pvfb->mmap_file, "%s/Xvfb_screen%d", pfbdir, pvfb->scrnum);
> + sprintf(pvfb->mmap_file, "%s/Xvfb_screen%d", pfbdir, (int) (pvfb - vfbScreens));
...
> - ErrorF("screen %d shmid %d\n", pvfb->scrnum, pvfb->shmid);
> + ErrorF("screen %d shmid %d\n", (int) (pvfb - vfbScreens), pvfb->shmid);
That's a really nice catch :) But hey, do we need to be verbose here? I'd
prefer to avoid these pointer calculation, which is really bad for readability
of code.
Even so:
Reviewed-by: Tiago Vignatti <tiago.vignatti at nokia.com>
Tiago
More information about the xorg-devel
mailing list