com php-src: refixed printf fmt, used portable macros: ext/standard/crypt_sha256.c ext/standard/crypt_sh a512.c
| From: | Anatol Belski | Date: | Sat, 20 Sep 2014 13:46:19 +0000 |
| Subject: | com php-src: refixed printf fmt, used portable macros: ext/standard/crypt_sha256.c ext/standard/crypt_sh a512.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81806@lists.php.net to get a copy of this message | ||
Commit: 763bfb4f3b0e66d5a961f9f367aa86e9f9da262e
Author: Anatol Belski <ab@php.net> Sat, 20 Sep 2014 15:46:19 +0200
Parents: 1b3569235a47887fbaa4ac53f615dc43dbc1394d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=763bfb4f3b0e66d5a961f9f367aa86e9f9da262e
Log:
refixed printf fmt, used portable macros
Changed paths:
M ext/standard/crypt_sha256.c
M ext/standard/crypt_sha512.c
Diff:
diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c
index ee68cec..5f28bd7 100644
--- a/ext/standard/crypt_sha256.c
+++ b/ext/standard/crypt_sha256.c
@@ -520,7 +520,7 @@ char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int b
if (rounds_custom) {
#ifdef PHP_WIN32
- int n = _snprintf(cp, MAX(0, buflen), "%s%I64u$", sha256_rounds_prefix, rounds);
+ int n = _snprintf(cp, MAX(0, buflen), "%s" ZEND_ULONG_FMT "$",
sha256_rounds_prefix, rounds);
#else
int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha256_rounds_prefix, rounds);
#endif
diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c
index 9e5def3..df5f3d1 100644
--- a/ext/standard/crypt_sha512.c
+++ b/ext/standard/crypt_sha512.c
@@ -555,7 +555,7 @@ php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
if (rounds_custom) {
#ifdef PHP_WIN32
- int n = _snprintf(cp, MAX(0, buflen), "%s%I64u$", sha512_rounds_prefix, rounds);
+ int n = _snprintf(cp, MAX(0, buflen), "%s" ZEND_ULONG_FMT "$",
sha512_rounds_prefix, rounds);
#else
int n = snprintf(cp, MAX(0, buflen), "%s%zu$", sha512_rounds_prefix, rounds);
#endif