mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Use proper printf() specifiers
This commit is contained in:
parent
9118a96fb0
commit
5d3be966f9
@ -497,7 +497,7 @@ static void generate_dispids(php_dispatchex *disp)
|
||||
|
||||
char namebuf[32];
|
||||
if (keytype == HASH_KEY_IS_LONG) {
|
||||
snprintf(namebuf, sizeof(namebuf), "%d", pid);
|
||||
snprintf(namebuf, sizeof(namebuf), ZEND_ULONG_FMT, pid);
|
||||
name = zend_string_init(namebuf, strlen(namebuf), 0);
|
||||
} else {
|
||||
zend_string_addref(name);
|
||||
|
@ -270,7 +270,7 @@ PHPAPI int TSendMail(char *host, int *error, char **error_message,
|
||||
/* 128 is safe here, the specifier in snprintf isn't longer than that */
|
||||
*error_message = ecalloc(1, HOST_NAME_LEN + 128);
|
||||
snprintf(*error_message, HOST_NAME_LEN + 128,
|
||||
"Failed to connect to mailserver at \"%s\" port %d, verify your \"SMTP\" "
|
||||
"Failed to connect to mailserver at \"%s\" port " ZEND_ULONG_FMT ", verify your \"SMTP\" "
|
||||
"and \"smtp_port\" setting in php.ini or use ini_set()",
|
||||
PW32G(mail_host), !INI_INT("smtp_port") ? 25 : INI_INT("smtp_port"));
|
||||
return FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user