com php-src: Remove redundant checks in ext/gd: ext/gd/gd.c
| From: | Nikita Popov | Date: | Mon, 04 Sep 2017 19:30:09 +0000 |
| Subject: | com php-src: Remove redundant checks in ext/gd: ext/gd/gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99254@lists.php.net to get a copy of this message | ||
Commit: da0b5b35c5f0c577d6919ab9f76cc6f651cc2957
Author: Tom Van Looy <tom@ctors.net> Mon, 4 Sep 2017 14:12:56 +0200
Committer: Nikita Popov <nikita.ppv@gmail.com> Mon, 4 Sep 2017 21:30:09 +0200
Parents: 80881194a1ca157e4080c4decfc35f11d68238cd
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da0b5b35c5f0c577d6919ab9f76cc6f651cc2957
Log:
Remove redundant checks in ext/gd
Changed paths:
M ext/gd/gd.c
Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index e5ab805..640886e 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -4396,10 +4396,6 @@ static void php_image_filter_brightness(INTERNAL_FUNCTION_PARAMETERS)
RETURN_FALSE;
}
- if (im_src == NULL) {
- RETURN_FALSE;
- }
-
if (gdImageBrightness(im_src, (int)brightness) == 1) {
RETURN_TRUE;
}
@@ -4421,10 +4417,6 @@ static void php_image_filter_contrast(INTERNAL_FUNCTION_PARAMETERS)
RETURN_FALSE;
}
- if (im_src == NULL) {
- RETURN_FALSE;
- }
-
if (gdImageContrast(im_src, (int)contrast) == 1) {
RETURN_TRUE;
}
@@ -4447,10 +4439,6 @@ static void php_image_filter_colorize(INTERNAL_FUNCTION_PARAMETERS)
RETURN_FALSE;
}
- if (im_src == NULL) {
- RETURN_FALSE;
- }
-
if (gdImageColor(im_src, (int) r, (int) g, (int) b, (int) a) == 1) {
RETURN_TRUE;
}
@@ -4528,10 +4516,6 @@ static void php_image_filter_smooth(INTERNAL_FUNCTION_PARAMETERS)
RETURN_FALSE;
}
- if (im_src == NULL) {
- RETURN_FALSE;
- }
-
if (gdImageSmooth(im_src, (float)weight)==1) {
RETURN_TRUE;
}
@@ -4554,10 +4538,6 @@ static void php_image_filter_pixelate(INTERNAL_FUNCTION_PARAMETERS)
RETURN_FALSE;
}
- if (im == NULL) {
- RETURN_FALSE;
- }
-
if (gdImagePixelate(im, (int) blocksize, (const unsigned int) mode)) {
RETURN_TRUE;
}