Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(680)

Unified Diff: source/common/uhash.c

Issue 285520043: ticket:12012: Replace all sizeof p / sizeof *p with UPRV_LENGTHOF(). (Closed) Base URL: svn+ssh://source.icu-project.org/repos/icu/icu/trunk
Patch Set: Code review. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/ucurr.cpp ('k') | source/common/uloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/uhash.c
diff --git a/source/common/uhash.c b/source/common/uhash.c
index 400157dc92b1c4306519a68ed526ca8f72b10701..3aa74fd3fe547106496dec9a6560ae555244358e 100644
--- a/source/common/uhash.c
+++ b/source/common/uhash.c
@@ -1,6 +1,6 @@
/*
******************************************************************************
-* Copyright (C) 1997-2014, International Business Machines
+* Copyright (C) 1997-2016, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
* Date Name Description
@@ -83,7 +83,7 @@ static const int32_t PRIMES[] = {
1073741789, 2147483647 /*, 4294967291 */
};
-#define PRIMES_LENGTH (sizeof(PRIMES) / sizeof(PRIMES[0]))
+#define PRIMES_LENGTH UPRV_LENGTHOF(PRIMES)
#define DEFAULT_PRIME_INDEX 3
/* These ratios are tuned to the PRIMES array such that a resize
« no previous file with comments | « source/common/ucurr.cpp ('k') | source/common/uloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b