From f3aca240d1bd28d87431db8b1fbcad7a3d36d648 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 28 Dec 2019 20:40:37 +0100 Subject: Image.c: code simplification/scope --- nx-X11/programs/Xserver/hw/nxagent/Image.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c index 34d5cf9f9..69a51075c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Image.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c @@ -140,9 +140,7 @@ static char *nxagentImageCopy(XImage *source, XImage *destination); * expensive than a copy. */ -#define nxagentNeedCache(image, method) \ -\ - ((method) != PACK_BITMAP_16M_COLORS) +#define nxagentNeedCache(image, method) ((method) != PACK_BITMAP_16M_COLORS) /* * With the bitmap encoding, if the image is 32 bits-per-pixel the 4th @@ -276,6 +274,7 @@ int nxagentImagePad(int width, int format, int leftPad, int depth) else if (format == XYPixmap) { line = BitmapBytePad(width + leftPad); + /* FIXME: shouldn't we multiply by depth here like in nxagentImageLength? */ } else if (format == ZPixmap) { @@ -1559,7 +1558,6 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio, XImage **pImage, int *scaledx, int *scaledy) { XImage *image = *pImage; - if (image == NULL) { return 0; -- cgit v1.2.3