Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: src/core/SkTDynamicHash.h

Issue 24267014: low hanging calloc fruit (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkBitmap.cpp ('K') | « src/core/SkBitmap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTDynamicHash.h
diff --git a/src/core/SkTDynamicHash.h b/src/core/SkTDynamicHash.h
index 47412c34b12e2cee6233371ce5f7d890a1edbb1d..4cb44204c85f61130354d25c78c7924249fe66f8 100644
--- a/src/core/SkTDynamicHash.h
+++ b/src/core/SkTDynamicHash.h
@@ -92,9 +92,7 @@ private:
static T* Deleted() { return reinterpret_cast<T*>(1); } // Also an invalid pointer.
static T** AllocArray(int capacity) {
- T** array = (T**)sk_malloc_throw(sizeof(T*) * capacity);
- sk_bzero(array, sizeof(T*) * capacity); // All cells == Empty().
- return array;
+ return (T**)sk_calloc_throw(sizeof(T*) * capacity); // All cells == Empty().
}
void reset(int capacity) {
« src/core/SkBitmap.cpp ('K') | « src/core/SkBitmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698