summaryrefslogtreecommitdiff
path: root/sapi
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 /sapi
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 'sapi')
-rw-r--r--sapi/cli/php_cli_server.c2
-rw-r--r--sapi/fpm/fpm/fpm_log.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 650f488752..453fe82998 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -1857,7 +1857,7 @@ static int php_cli_server_send_error_page(php_cli_server *server, php_cli_server
if (!chunk) {
goto fail;
}
- snprintf(chunk->data.heap.p, chunk->data.heap.len, prologue_template, status, status_string, ZSTR_VAL(escaped_request_uri));
+ snprintf(chunk->data.heap.p, chunk->data.heap.len, prologue_template, status, status_string);
chunk->data.heap.len = strlen(chunk->data.heap.p);
php_cli_server_buffer_append(&client->content_sender.buffer, chunk);
}
diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c
index 5aad9a08c9..e04c236991 100644
--- a/sapi/fpm/fpm/fpm_log.c
+++ b/sapi/fpm/fpm/fpm_log.c
@@ -267,13 +267,13 @@ int fpm_log_write(char *log_format) /* {{{ */
/* kilobytes */
} else if (!strcasecmp(format, "kilobytes") || !strcasecmp(format, "kilo")) {
if (!test) {
- len2 = snprintf(b, FPM_LOG_BUFFER - len, "%lu", proc.memory / 1024);
+ len2 = snprintf(b, FPM_LOG_BUFFER - len, "%zu", proc.memory / 1024);
}
/* megabytes */
} else if (!strcasecmp(format, "megabytes") || !strcasecmp(format, "mega")) {
if (!test) {
- len2 = snprintf(b, FPM_LOG_BUFFER - len, "%lu", proc.memory / 1024 / 1024);
+ len2 = snprintf(b, FPM_LOG_BUFFER - len, "%zu", proc.memory / 1024 / 1024);
}
} else {