Hi,

This patch is mainly about misspells of the word "occurrence" in the
code of ebtree. The misspells are only located in code comments.

The patch is attached, but if you want to view the diff online, you
can check: https://github.com/haproxy/haproxy/compare/master...aerostitch:ebtree

Thanks for your help,
Joseph
From bca687d8d0d8143ddf5a1669244f7d4e1554bf8b Mon Sep 17 00:00:00 2001
From: Joseph Herlant <aerosti...@debian.org>
Date: Tue, 13 Nov 2018 19:55:57 -0800
Subject: [PATCH] CLEANUP: fix typos in comments in ebtree

This is mainly about misspells of the word "occurrence". The misspells
are only located in code comments.
---
 ebtree/eb32tree.h | 4 ++--
 ebtree/eb64tree.h | 4 ++--
 ebtree/ebimtree.c | 2 +-
 ebtree/ebimtree.h | 4 ++--
 ebtree/ebistree.c | 2 +-
 ebtree/ebistree.h | 4 ++--
 ebtree/ebmbtree.c | 6 +++---
 ebtree/ebmbtree.h | 8 ++++----
 ebtree/ebsttree.c | 2 +-
 ebtree/ebsttree.h | 4 ++--
 10 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/ebtree/eb32tree.h b/ebtree/eb32tree.h
index f33eb865..08ff9006 100644
--- a/ebtree/eb32tree.h
+++ b/ebtree/eb32tree.h
@@ -129,7 +129,7 @@ static forceinline void __eb32_delete(struct eb32_node *eb32)
 }
 
 /*
- * Find the first occurence of a key in the tree <root>. If none can be
+ * Find the first occurrence of a key in the tree <root>. If none can be
  * found, return NULL.
  */
 static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x)
@@ -180,7 +180,7 @@ static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x)
 }
 
 /*
- * Find the first occurence of a signed key in the tree <root>. If none can
+ * Find the first occurrence of a signed key in the tree <root>. If none can
  * be found, return NULL.
  */
 static forceinline struct eb32_node *__eb32i_lookup(struct eb_root *root, s32 x)
diff --git a/ebtree/eb64tree.h b/ebtree/eb64tree.h
index 2ab833ff..6d0d0391 100644
--- a/ebtree/eb64tree.h
+++ b/ebtree/eb64tree.h
@@ -129,7 +129,7 @@ static forceinline void __eb64_delete(struct eb64_node *eb64)
 }
 
 /*
- * Find the first occurence of a key in the tree <root>. If none can be
+ * Find the first occurrence of a key in the tree <root>. If none can be
  * found, return NULL.
  */
 static forceinline struct eb64_node *__eb64_lookup(struct eb_root *root, u64 x)
@@ -178,7 +178,7 @@ static forceinline struct eb64_node *__eb64_lookup(struct eb_root *root, u64 x)
 }
 
 /*
- * Find the first occurence of a signed key in the tree <root>. If none can
+ * Find the first occurrence of a signed key in the tree <root>. If none can
  * be found, return NULL.
  */
 static forceinline struct eb64_node *__eb64i_lookup(struct eb_root *root, s64 x)
diff --git a/ebtree/ebimtree.c b/ebtree/ebimtree.c
index 092a0ac8..8a75cd84 100644
--- a/ebtree/ebimtree.c
+++ b/ebtree/ebimtree.c
@@ -23,7 +23,7 @@
 #include "ebpttree.h"
 #include "ebimtree.h"
 
-/* Find the first occurence of a key of <len> bytes in the tree <root>.
+/* Find the first occurrence of a key of <len> bytes in the tree <root>.
  * If none can be found, return NULL.
  */
 REGPRM3 struct ebpt_node *
diff --git a/ebtree/ebimtree.h b/ebtree/ebimtree.h
index 99e75039..4a98c96a 100644
--- a/ebtree/ebimtree.h
+++ b/ebtree/ebimtree.h
@@ -35,7 +35,7 @@
 REGPRM3 struct ebpt_node *ebim_lookup(struct eb_root *root, const void *x, unsigned int len);
 REGPRM3 struct ebpt_node *ebim_insert(struct eb_root *root, struct ebpt_node *new, unsigned int len);
 
-/* Find the first occurence of a key of a least <len> bytes matching <x> in the
+/* Find the first occurrence of a key of a least <len> bytes matching <x> in the
  * tree <root>. The caller is responsible for ensuring that <len> will not exceed
  * the common parts between the tree's keys and <x>. In case of multiple matches,
  * the leftmost node is returned. This means that this function can be used to
@@ -89,7 +89,7 @@ __ebim_lookup(struct eb_root *root, const void *x, unsigned int len)
 		 */
 		node_bit = ~node_bit + (pos << 3) + 8; // = (pos<<3) + (7 - node_bit)
 		if (node_bit < 0) {
-			/* This surprizing construction gives better performance
+			/* This surprising construction gives better performance
 			 * because gcc does not try to reorder the loop. Tested to
 			 * be fine with 2.95 to 4.2.
 			 */
diff --git a/ebtree/ebistree.c b/ebtree/ebistree.c
index 222a4375..d3dc0c5e 100644
--- a/ebtree/ebistree.c
+++ b/ebtree/ebistree.c
@@ -22,7 +22,7 @@
 
 #include "ebistree.h"
 
-/* Find the first occurence of a zero-terminated string <x> in the tree <root>.
+/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
  * It's the caller's reponsibility to use this function only on trees which
  * only contain zero-terminated strings. If none can be found, return NULL.
  */
diff --git a/ebtree/ebistree.h b/ebtree/ebistree.h
index e1bcbc70..9c4fd8cb 100644
--- a/ebtree/ebistree.h
+++ b/ebtree/ebistree.h
@@ -38,7 +38,7 @@
 REGPRM2 struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x);
 REGPRM2 struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new);
 
-/* Find the first occurence of a length <len> string <x> in the tree <root>.
+/* Find the first occurrence of a length <len> string <x> in the tree <root>.
  * It's the caller's reponsibility to use this function only on trees which
  * only contain zero-terminated strings, and that no null character is present
  * in string <x> in the first <len> chars. If none can be found, return NULL.
@@ -54,7 +54,7 @@ ebis_lookup_len(struct eb_root *root, const char *x, unsigned int len)
 	return node;
 }
 
-/* Find the first occurence of a zero-terminated string <x> in the tree <root>.
+/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
  * It's the caller's reponsibility to use this function only on trees which
  * only contain zero-terminated strings. If none can be found, return NULL.
  */
diff --git a/ebtree/ebmbtree.c b/ebtree/ebmbtree.c
index ebd6b8b1..5fbef208 100644
--- a/ebtree/ebmbtree.c
+++ b/ebtree/ebmbtree.c
@@ -22,7 +22,7 @@
 
 #include "ebmbtree.h"
 
-/* Find the first occurence of a key of <len> bytes in the tree <root>.
+/* Find the first occurrence of a key of <len> bytes in the tree <root>.
  * If none can be found, return NULL.
  */
 REGPRM3 struct ebmb_node *
@@ -42,7 +42,7 @@ ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int len)
 	return __ebmb_insert(root, new, len);
 }
 
-/* Find the first occurence of the longest prefix matching a key <x> in the
+/* Find the first occurrence of the longest prefix matching a key <x> in the
  * tree <root>. It's the caller's responsibility to ensure that key <x> is at
  * least as long as the keys in the tree. If none can be found, return NULL.
  */
@@ -52,7 +52,7 @@ ebmb_lookup_longest(struct eb_root *root, const void *x)
 	return __ebmb_lookup_longest(root, x);
 }
 
-/* Find the first occurence of a prefix matching a key <x> of <pfx> BITS in the
+/* Find the first occurrence of a prefix matching a key <x> of <pfx> BITS in the
  * tree <root>. If none can be found, return NULL.
  */
 REGPRM3 struct ebmb_node *
diff --git a/ebtree/ebmbtree.h b/ebtree/ebmbtree.h
index 5ab115d0..6ed7de4b 100644
--- a/ebtree/ebmbtree.h
+++ b/ebtree/ebmbtree.h
@@ -123,7 +123,7 @@ static forceinline void __ebmb_delete(struct ebmb_node *ebmb)
 	__eb_delete(&ebmb->node);
 }
 
-/* Find the first occurence of a key of a least <len> bytes matching <x> in the
+/* Find the first occurrence of a key of a least <len> bytes matching <x> in the
  * tree <root>. The caller is responsible for ensuring that <len> will not exceed
  * the common parts between the tree's keys and <x>. In case of multiple matches,
  * the leftmost node is returned. This means that this function can be used to
@@ -176,7 +176,7 @@ static forceinline struct ebmb_node *__ebmb_lookup(struct eb_root *root, const v
 		 */
 		node_bit = ~node_bit + (pos << 3) + 8; // = (pos<<3) + (7 - node_bit)
 		if (node_bit < 0) {
-			/* This surprizing construction gives better performance
+			/* This surprising construction gives better performance
 			 * because gcc does not try to reorder the loop. Tested to
 			 * be fine with 2.95 to 4.2.
 			 */
@@ -371,7 +371,7 @@ __ebmb_insert(struct eb_root *root, struct ebmb_node *new, unsigned int len)
 }
 
 
-/* Find the first occurence of the longest prefix matching a key <x> in the
+/* Find the first occurrence of the longest prefix matching a key <x> in the
  * tree <root>. It's the caller's responsibility to ensure that key <x> is at
  * least as long as the keys in the tree. Note that this can be ensured by
  * having a byte at the end of <x> which cannot be part of any prefix, typically
@@ -465,7 +465,7 @@ static forceinline struct ebmb_node *__ebmb_lookup_longest(struct eb_root *root,
 }
 
 
-/* Find the first occurence of a prefix matching a key <x> of <pfx> BITS in the
+/* Find the first occurrence of a prefix matching a key <x> of <pfx> BITS in the
  * tree <root>. It's the caller's responsibility to ensure that key <x> is at
  * least as long as the keys in the tree. Note that this can be ensured by
  * having a byte at the end of <x> which cannot be part of any prefix, typically
diff --git a/ebtree/ebsttree.c b/ebtree/ebsttree.c
index cfd3266f..88b8139c 100644
--- a/ebtree/ebsttree.c
+++ b/ebtree/ebsttree.c
@@ -22,7 +22,7 @@
 
 #include "ebsttree.h"
 
-/* Find the first occurence of a zero-terminated string <x> in the tree <root>.
+/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
  * It's the caller's reponsibility to use this function only on trees which
  * only contain zero-terminated strings. If none can be found, return NULL.
  */
diff --git a/ebtree/ebsttree.h b/ebtree/ebsttree.h
index f86101db..cd6994c6 100644
--- a/ebtree/ebsttree.h
+++ b/ebtree/ebsttree.h
@@ -32,7 +32,7 @@
 REGPRM2 struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x);
 REGPRM2 struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new);
 
-/* Find the first occurence of a length <len> string <x> in the tree <root>.
+/* Find the first occurrence of a length <len> string <x> in the tree <root>.
  * It's the caller's reponsibility to use this function only on trees which
  * only contain zero-terminated strings, and that no null character is present
  * in string <x> in the first <len> chars. If none can be found, return NULL.
@@ -48,7 +48,7 @@ ebst_lookup_len(struct eb_root *root, const char *x, unsigned int len)
 	return node;
 }
 
-/* Find the first occurence of a zero-terminated string <x> in the tree <root>.
+/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
  * It's the caller's reponsibility to use this function only on trees which
  * only contain zero-terminated strings. If none can be found, return NULL.
  */
-- 
2.19.1

Reply via email to