summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-02-27 03:28:17 (GMT)
committerIlia Alshanetsky <iliaa@php.net>2007-02-27 03:28:17 (GMT)
commitefad70c2cc2edd8416a18ea6daf06f8627d1d68d (patch)
tree0a59c0e22bb3b224433600d86b8430276ed87b45 /sapi
parentcc04404b28d10481f63be986fe815de1fe31088b (diff)
downloadphp-efad70c2cc2edd8416a18ea6daf06f8627d1d68d.tar.gz
snprintf() -> slprintf()
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cgi/cgi_main.c8
-rw-r--r--sapi/cgi/fastcgi.c4
-rw-r--r--sapi/tux/php_tux.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index fba7686..d97d75e 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -325,7 +325,7 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
int len;
if (CGIG(rfc2616_headers) && SG(sapi_headers).http_status_line) {
- len = snprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH,
+ len = slprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH,
"%s\r\n", SG(sapi_headers).http_status_line);
if (len > SAPI_CGI_MAX_HEADER_LENGTH) {
@@ -333,7 +333,7 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
}
} else {
- len = snprintf(buf, sizeof(buf), "Status: %d\r\n", SG(sapi_headers).http_response_code);
+ len = slprintf(buf, sizeof(buf), "Status: %d\r\n", SG(sapi_headers).http_response_code);
}
PHPWRITE_H(buf, len);
@@ -444,13 +444,13 @@ static char *_sapi_cgibin_putenv(char *name, char *value TSRMLS_DC)
#endif
#if !HAVE_SETENV
if (value) {
- len = snprintf(buf, len - 1, "%s=%s", name, value);
+ len = slprintf(buf, len - 1, "%s=%s", name, value);
putenv(buf);
}
#endif
#if !HAVE_UNSETENV
if (!value) {
- len = snprintf(buf, len - 1, "%s=", name);
+ len = slprintf(buf, len - 1, "%s=", name);
putenv(buf);
}
#endif
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
index 6e91580..8ca3d56 100644
--- a/sapi/cgi/fastcgi.c
+++ b/sapi/cgi/fastcgi.c
@@ -588,8 +588,8 @@ static int fcgi_read_request(fcgi_request *req)
for (j = 0; j < sizeof(fcgi_mgmt_vars)/sizeof(fcgi_mgmt_vars[0]); j++) {
if (zend_hash_exists(&req->env, fcgi_mgmt_vars[j].name, fcgi_mgmt_vars[j].name_len+1) == 0) {
- sprintf((char*)p, "%c%c%s%c", fcgi_mgmt_vars[j].name_len, 1, fcgi_mgmt_vars[j].name, fcgi_mgmt_vars[j].val);
- p += fcgi_mgmt_vars[j].name_len + 3;
+ sprintf((char*)p, "%c%c%s%c", fcgi_mgmt_vars[j].name_len, 1, fcgi_mgmt_vars[j].name, fcgi_mgmt_vars[j].val);
+ p += fcgi_mgmt_vars[j].name_len + 3;
}
}
len = p - buf - sizeof(fcgi_header);
diff --git a/sapi/tux/php_tux.c b/sapi/tux/php_tux.c
index fd11bd8..3a3a452 100644
--- a/sapi/tux/php_tux.c
+++ b/sapi/tux/php_tux.c
@@ -116,7 +116,7 @@ static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers)
status_line = malloc(30);
/* safe sprintf use */
- len = snprintf(status_line, 30, "HTTP/1.1 %d NA\r\n", SG(sapi_headers).http_response_code);
+ len = slprintf(status_line, 30, "HTTP/1.1 %d NA\r\n", SG(sapi_headers).http_response_code);
vec[0].iov_base = status_line;
vec[0].iov_len = len;
@@ -195,7 +195,7 @@ static void sapi_tux_register_variables(zval *track_vars_array TSRMLS_DC)
sapi_header_line ctr = {0};
ctr.line = buf;
- ctr.line_len = snprintf(buf, sizeof(buf), "Server: %s", TUXAPI_version);
+ ctr.line_len = slprintf(buf, sizeof(buf), "Server: %s", TUXAPI_version);
sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
php_register_variable("PHP_SELF", SG(request_info).request_uri, track_vars_array TSRMLS_CC);