From a08fdb8b074286503bb746d7e23d164fbc7b45f1 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 8 Jul 2018 15:49:01 +0200 Subject: [PATCH] Minor refactoring and whitespace cleanup. --- MagickCore/distort.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/MagickCore/distort.c b/MagickCore/distort.c index 9ea908ae2..5f0d67d64 100644 --- a/MagickCore/distort.c +++ b/MagickCore/distort.c @@ -1490,7 +1490,7 @@ MagickExport Image *DistortResizeImage(const Image *image, return((Image *) NULL); /* Do not short-circuit this resize if final image size is unchanged */ - (void) memset(distort_args,0,12*sizeof(double)); + (void) memset(distort_args,0,sizeof(distort_args)); distort_args[4]=(double) image->columns; distort_args[6]=(double) columns; distort_args[9]=(double) image->rows; @@ -1499,7 +1499,7 @@ MagickExport Image *DistortResizeImage(const Image *image, vp_save=GetImageVirtualPixelMethod(image); tmp_image=CloneImage(image,0,0,MagickTrue,exception); - if ( tmp_image == (Image *) NULL ) + if (tmp_image == (Image *) NULL) return((Image *) NULL); (void) SetImageVirtualPixelMethod(tmp_image,TransparentVirtualPixelMethod, exception); @@ -1514,7 +1514,7 @@ MagickExport Image *DistortResizeImage(const Image *image, MagickTrue,exception), tmp_image=DestroyImage(tmp_image); - if ( resize_image == (Image *) NULL ) + if (resize_image == (Image *) NULL) return((Image *) NULL); (void) SetImageAlphaChannel(resize_image,DeactivateAlphaChannel, @@ -1542,13 +1542,14 @@ MagickExport Image *DistortResizeImage(const Image *image, /* distort the actual image containing alpha + VP alpha */ tmp_image=CloneImage(image,0,0,MagickTrue,exception); - if ( tmp_image == (Image *) NULL ) + if (tmp_image == (Image *) NULL) return((Image *) NULL); - (void) SetImageVirtualPixelMethod(tmp_image,TransparentVirtualPixelMethod, exception); + (void) SetImageVirtualPixelMethod(tmp_image, + TransparentVirtualPixelMethod,exception); resize_image=DistortImage(tmp_image,AffineDistortion,12,distort_args, MagickTrue,exception), tmp_image=DestroyImage(tmp_image); - if ( resize_image == (Image *) NULL) + if (resize_image == (Image *) NULL) { resize_alpha=DestroyImage(resize_alpha); return((Image *) NULL); -- 2.40.0