From: Christoph M. Becker Date: Mon, 6 Jan 2020 07:53:50 +0000 (+0100) Subject: Remove useless else branch X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d83f89f076612a742433fed64f7d5d368435173e;p=php 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. --- 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) {