From: Evgeniy Stepanov Date: Mon, 11 Feb 2013 14:08:12 +0000 (+0000) Subject: [sanitizer] Remove an extra va_copy. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5eb25e8d392179480d351322bfeff75b4f3d92ee;p=platform%2Fupstream%2Fllvm.git [sanitizer] Remove an extra va_copy. llvm-svn: 174883 --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index e016abdc..918c16f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -24,6 +24,10 @@ #include +#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; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc index 3a0e5f5c..50ce70f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc @@ -14,10 +14,6 @@ //===----------------------------------------------------------------------===// #include -#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) {