Skip to contentSkip to conversation

mkfs.ubifs: use common ARRAY_SIZE

PATCH In review Mike Frysinger 2 participants 2 messages Sep 24, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mkfs.ubifs: use common ARRAY_SIZE

---
 mkfs.ubifs/hashtable/hashtable.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
mkfs.ubifs/hashtable/hashtable.c +2 -1
index 763357e..b751c62 100644
@@ -1,5 +1,6 @@
 /* Copyright (C) 2004 Christopher Clark <[email protected]> */
 
+#include "common.h"
 #include "hashtable.h"
 #include "hashtable_private.h"
 #include <stdlib.h>
@@ -21,7 +22,7 @@ static const unsigned int primes[] = {
 50331653, 100663319, 201326611, 402653189,
 805306457, 1610612741
 };
-const unsigned int prime_table_length = sizeof(primes)/sizeof(primes[0]);
+const unsigned int prime_table_length = ARRAY_SIZE(primes);
 const float max_load_factor = 0.65;
 
 /*****************************************************************************/
Signature · 1 line
1.7.3
#1 lore raw
Quoted 4 lines · Mike Frysinger
---
 mkfs.ubifs/hashtable/hashtable.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Pushed, thanks.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)