From: Alexey Samsonov Date: Mon, 30 Jun 2014 22:40:58 +0000 (+0000) Subject: Fix apparent thinko in r209744: allocator stats can be zero X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cffaa1c2989dd8a8dfd0229600c641f2c64336d2;p=platform%2Fupstream%2Fllvm.git Fix apparent thinko in r209744: allocator stats can be zero llvm-svn: 212071 --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h index 0172e73..c83c672 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h @@ -273,9 +273,9 @@ class AllocatorGlobalStats : public AllocatorStats { if (stats == this) break; } - // All stats must be positive. + // All stats must be non-negative. for (int i = 0; i < AllocatorStatCount; i++) - s[i] = ((sptr)s[i]) > 0 ? s[i] : 1; + s[i] = ((sptr)s[i]) >= 0 ? s[i] : 0; } private: