[sanitizer] Remove an extra va_copy.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 11 Feb 2013 14:08:12 +0000 (14:08 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 11 Feb 2013 14:08:12 +0000 (14:08 +0000)
llvm-svn: 174883

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc

index e016abd..918c16f 100644 (file)
 
 #include <stdarg.h>
 
+#ifdef _WIN32
+#define va_copy(dst, src) ((dst) = (src))
+#endif // _WIN32
+
 #if SANITIZER_INTERCEPT_READ
 INTERCEPTOR(SSIZE_T, read, int fd, void *ptr, SIZE_T count) {
   void* ctx;
index 3a0e5f5..50ce70f 100644 (file)
 //===----------------------------------------------------------------------===//
 #include <stdarg.h>
 
-#ifdef _WIN32
-#define va_copy(dst, src) ((dst) = (src))
-#endif // _WIN32
-
 struct ScanfDirective {
   int argIdx;      // argument index, or -1 of not specified ("%n$")
   int fieldWidth;
@@ -274,10 +270,7 @@ static int scanf_get_store_size(ScanfDirective *dir) {
 
 // Common part of *scanf interceptors.
 // Process format string and va_list, and report all store ranges.
-static void scanf_common(void *ctx, const char *format, va_list ap_const) {
-  va_list aq;
-  va_copy(aq, ap_const);
-
+static void scanf_common(void *ctx, const char *format, va_list aq) {
   const char *p = format;
 
   while (p) {