From cdd8368d6f3f000a2e30a6be9976c5539f10fe85 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 19 Aug 2018 01:32:00 -0300 Subject: Clean up unnecessary ternary expressions and simplify some returns - Simplify conditions - Use ZEND_HASH_APPLY_* instead of hard-coded booleans - Use ZEND_NORMALIZE_BOOL - Drop sign in favor of ZEND_NORMALIZE_BOOL --- ext/imap/php_imap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ext/imap/php_imap.c') diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 9e626a4cfa..2863657827 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -4074,11 +4074,8 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * } fprintf(sendmail, "\n%s\n", message); ret = pclose(sendmail); - if (ret == -1) { - return 0; - } else { - return 1; - } + + return ret != -1; } else { php_error_docref(NULL, E_WARNING, "Could not execute mail delivery program"); return 0; -- cgit v1.2.1