From d83f89f076612a742433fed64f7d5d368435173e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 6 Jan 2020 08:53:50 +0100 Subject: [PATCH] Remove useless else branch Passing `NULL` as `gdTransformAffineGetImage()`'s `src_area` is fine, but in this case there's no need to calculate the `rect`, and since `pRect` has already been initialized to `NULL`, we can remove the whole else branch. --- ext/gd/gd.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 8791940089..68c5f4fe31 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3936,12 +3936,6 @@ PHP_FUNCTION(imageaffine) RETURN_THROWS(); } pRect = ▭ - } else { - rect.x = -1; - rect.y = -1; - rect.width = gdImageSX(src); - rect.height = gdImageSY(src); - pRect = NULL; } if (gdTransformAffineGetImage(&dst, src, pRect, affine) != GD_TRUE) { -- 2.40.0