diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-05 18:36:27 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-05 18:40:23 +0200 |
commit | 2965c8f86890c106ed34266e7bd32142cd247aea (patch) | |
tree | 74562d0deb10a0880eb5fdc8d90da66267a462be /ext/date/php_date.c | |
parent | 74b285d78caf92364584397c2d986ad35cdeb856 (diff) | |
download | php-git-2965c8f86890c106ed34266e7bd32142cd247aea.tar.gz |
Prefer strtoll over atoll
Both are specified by C99, but strtoll has specified overflow
behavior while atoll does not, so prefer using it.
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 8f755d887f..d81bc1659a 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -51,11 +51,7 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i; int st = snprintf(s, len, "%lld", i); \ s[st] = '\0'; \ } while (0); -#ifdef HAVE_ATOLL -# define DATE_A64I(i, s) i = atoll(s) -#else -# define DATE_A64I(i, s) i = strtoll(s, NULL, 10) -#endif +#define DATE_A64I(i, s) i = strtoll(s, NULL, 10) #endif PHPAPI time_t php_time(void) |