1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-11 03:05:52 +01:00

Optimized some of the previous changes related to order of evaluation.

This commit is contained in:
dan
2000-11-06 14:36:22 +00:00
parent e7ce6468fc
commit 77670119a1
2 changed files with 5 additions and 4 deletions

View File

@@ -614,6 +614,8 @@ image2StandardPseudoColor(RContext *ctx, RImage *image)
err = (short*)malloc(3*(image->width+2)*sizeof(short));
nerr = (short*)malloc(3*(image->width+2)*sizeof(short));
if (!err || !nerr) {
if (err)
free(err);
if (nerr)
free(nerr);
RErrorCode = RERR_NOMEMORY;
@@ -626,7 +628,6 @@ image2StandardPseudoColor(RContext *ctx, RImage *image)
err[x++] = ptr[x1++];
}
err[x] = err[x+1] = err[x+2] = 0;
x += 3;
/* convert and dither the image to XImage */
for (y=0, ofs=0; y<image->height; y++) {
if (y<image->height-1) {