summaryrefslogtreecommitdiff
path: root/ext/ldap/ldap.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-06-21 16:00:37 +0300
committerDmitry Stogov <dmitry@zend.com>2016-06-21 16:00:37 +0300
commit16160386982a86e6ec7969c6c89707d38228f19e (patch)
tree47052539a23ab7d6d2cf79392dd1e47de67bb2f1 /ext/ldap/ldap.c
parent67e23f4be3c01a389043ee97b98d6bcc703d3557 (diff)
downloadphp-git-16160386982a86e6ec7969c6c89707d38228f19e.tar.gz
Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings. Fixed most incorrect use cases of format specifiers.
Diffstat (limited to 'ext/ldap/ldap.c')
-rw-r--r--ext/ldap/ldap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index c439c7358d..501552f86a 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -357,7 +357,7 @@ PHP_FUNCTION(ldap_connect)
#endif
if (LDAPG(max_links) != -1 && LDAPG(num_links) >= LDAPG(max_links)) {
- php_error_docref(NULL, E_WARNING, "Too many open links (%pd)", LDAPG(num_links));
+ php_error_docref(NULL, E_WARNING, "Too many open links (" ZEND_LONG_FMT ")", LDAPG(num_links));
RETURN_FALSE;
}
@@ -370,12 +370,12 @@ PHP_FUNCTION(ldap_connect)
int urllen = hostlen + sizeof( "ldap://:65535" );
if (port <= 0 || port > 65535) {
- php_error_docref(NULL, E_WARNING, "invalid port number: %ld", port);
+ php_error_docref(NULL, E_WARNING, "invalid port number: " ZEND_LONG_FMT, port);
RETURN_FALSE;
}
url = emalloc(urllen);
- snprintf( url, urllen, "ldap://%s:%ld", host ? host : "", port );
+ snprintf( url, urllen, "ldap://%s:" ZEND_LONG_FMT, host ? host : "", port );
}
#ifdef LDAP_API_FEATURE_X_OPENLDAP