summaryrefslogtreecommitdiff
path: root/src/journal/lookup3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/lookup3.c')
-rw-r--r--src/journal/lookup3.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/journal/lookup3.c b/src/journal/lookup3.c
index ec725ce46c..ff194dd951 100644
--- a/src/journal/lookup3.c
+++ b/src/journal/lookup3.c
@@ -214,7 +214,6 @@ uint32_t initval) /* the previous hash, or an arbitrary value */
return c;
}
-
/*
--------------------------------------------------------------------
hashword2() -- same as hashword(), but take two seeds and return two
@@ -260,7 +259,6 @@ uint32_t *pb) /* IN: more seed OUT: secondary hash value */
*pc=c; *pb=b;
}
-
/*
-------------------------------------------------------------------------------
hashlittle() -- hash a variable-length key into a 32-bit value
@@ -317,11 +315,11 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval)
* then masks off the part it's not allowed to read. Because the
* string is aligned, the masked-off tail is in the same word as the
* rest of the string. Every machine with memory protection I've seen
- * does it on word boundaries, so is OK with this. But VALGRIND will
+ * does it on word boundaries, so is OK with this. But valgrind will
* still catch it and complain. The masking trick does make the hash
* noticeably faster for short strings (like English words).
*/
-#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__)
+#if !VALGRIND && !defined(__SANITIZE_ADDRESS__)
switch(length)
{
@@ -458,7 +456,6 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval)
return c;
}
-
/*
* hashlittle2: return 2 32-bit hash values
*
@@ -503,11 +500,11 @@ void jenkins_hashlittle2(
* then masks off the part it's not allowed to read. Because the
* string is aligned, the masked-off tail is in the same word as the
* rest of the string. Every machine with memory protection I've seen
- * does it on word boundaries, so is OK with this. But VALGRIND will
+ * does it on word boundaries, so is OK with this. But valgrind will
* still catch it and complain. The masking trick does make the hash
* noticeably faster for short strings (like English words).
*/
-#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__)
+#if !VALGRIND && !defined(__SANITIZE_ADDRESS__)
switch(length)
{
@@ -644,8 +641,6 @@ void jenkins_hashlittle2(
*pc=c; *pb=b;
}
-
-
/*
* hashbig():
* This is the same as hashword() on big-endian machines. It is different
@@ -681,11 +676,11 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval)
* then shifts out the part it's not allowed to read. Because the
* string is aligned, the illegal read is in the same word as the
* rest of the string. Every machine with memory protection I've seen
- * does it on word boundaries, so is OK with this. But VALGRIND will
+ * does it on word boundaries, so is OK with this. But valgrind will
* still catch it and complain. The masking trick does make the hash
* noticeably faster for short strings (like English words).
*/
-#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__)
+#if !VALGRIND && !defined(__SANITIZE_ADDRESS__)
switch(length)
{
@@ -775,7 +770,6 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval)
return c;
}
-
#ifdef SELF_TEST
/* used for timings */
@@ -967,7 +961,6 @@ void driver3()
uint8_t buf[1];
uint32_t h,i,state[HASHSTATE];
-
buf[0] = ~0;
for (i=0; i<HASHSTATE; ++i) state[i] = 1;
printf("These should all be different\n");
@@ -999,7 +992,6 @@ void driver5()
printf("hash is %.8lx\n", c); /* cd628161 */
}
-
int main()
{
driver1(); /* test that the key is hashed: used for timings */