summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-08-15 17:05:37 +0000
committerSascha Schumann <sas@php.net>2000-08-15 17:05:37 +0000
commitce635bdb3c9ef72d9901e7f96f9efcac6cd5182a (patch)
tree635cda6c1f203fc0d19e0486aee84f333632b1ba /main
parent185f6e95d8452892cad7eb5ae701b456768eb250 (diff)
downloadphp-git-ce635bdb3c9ef72d9901e7f96f9efcac6cd5182a.tar.gz
Fix varargs handling. The assignments are not necessary at all and
cause problems on various platforms, so we get rid of them.
Diffstat (limited to 'main')
-rw-r--r--main/main.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/main/main.c b/main/main.c
index 3f24facad6..c39af4e537 100644
--- a/main/main.c
+++ b/main/main.c
@@ -330,7 +330,6 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
{
char buffer[1024];
int size = 0;
- va_list args;
ELS_FETCH();
PLS_FETCH();
@@ -366,9 +365,9 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
/* get include file name */
if (PG(log_errors) || PG(display_errors) || (!module_initialized)) {
- args = orig_args;
- size = vsnprintf(buffer, sizeof(buffer) - 1, format, args);
- va_end(args);
+ size = vsnprintf(buffer, sizeof(buffer) - 1, format, orig_args);
+ va_end(orig_args);
+
buffer[sizeof(buffer) - 1] = 0;
if (!module_initialized || PG(log_errors)) {
@@ -442,9 +441,8 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
if (PG(track_errors) && EG(active_symbol_table)) {
pval *tmp;
- args = orig_args;
- size = vsnprintf(buffer, sizeof(buffer) - 1, format, args);
- va_end(args);
+ size = vsnprintf(buffer, sizeof(buffer) - 1, format, orig_args);
+ va_end(orig_args);
buffer[sizeof(buffer) - 1] = 0;