com php-src: Remove useless condition: ext/date/php_date.c
| From: | Anatol Belski | Date: | Fri, 17 Nov 2017 22:32:03 +0000 |
| Subject: | com php-src: Remove useless condition: ext/date/php_date.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100301@lists.php.net to get a copy of this message | ||
Commit: 95bfbeeea828b1074521779f15364895a22d54a1
Author: Anatol Belski <ab@php.net> Fri, 17 Nov 2017 22:51:10 +0100
Parents: a8db62086efe256c120443862c55e305d3ceb359
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=95bfbeeea828b1074521779f15364895a22d54a1
Log:
Remove useless condition
Changed paths:
M ext/date/php_date.c
Diff:
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 000199c..b5d094c 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1336,9 +1336,9 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
offset->is_dst = t->dst;
offset->abbr = timelib_malloc(9); /* GMT±xxxx\0 */
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
- !localtime ? ((offset->offset < 0) ? '-' :
'+') : '+',
- !localtime ? abs(offset->offset / 3600) : 0,
- !localtime ? abs((offset->offset % 3600) / 60) : 0 );
+ (offset->offset < 0) ? '-' : '+',
+ abs(offset->offset / 3600),
+ abs((offset->offset % 3600) / 60));
} else {
offset = timelib_get_time_zone_info(t->sse, t->tz_info);
}