]> granicus.if.org Git - php/commitdiff
Fix varargs handling. The assignments are not necessary at all and
authorSascha Schumann <sas@php.net>
Tue, 15 Aug 2000 17:05:37 +0000 (17:05 +0000)
committerSascha Schumann <sas@php.net>
Tue, 15 Aug 2000 17:05:37 +0000 (17:05 +0000)
cause problems on various platforms, so we get rid of them.

main/main.c

index 3f24facad64dadbc5dcc60e399551940250febb2..c39af4e5377b3e7ea4ed0e316e5b88b8907ce02e 100644 (file)
@@ -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;