]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: fix typos in comments in ebtree
authorJoseph Herlant <aerostitch@debian.org>
Wed, 14 Nov 2018 03:55:57 +0000 (19:55 -0800)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 21:23:15 +0000 (22:23 +0100)
This is mainly about misspells of the word "occurrence". The misspells
are only located in code comments.

ebtree/eb32tree.h
ebtree/eb64tree.h
ebtree/ebimtree.c
ebtree/ebimtree.h
ebtree/ebistree.c
ebtree/ebistree.h
ebtree/ebmbtree.c
ebtree/ebmbtree.h
ebtree/ebsttree.c
ebtree/ebsttree.h

index f33eb86534d93e8086d40e15c968c850444733a0..08ff90064f9107d7354f87ef25db1a516f2d468c 100644 (file)
@@ -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)
index 2ab833ffaa5855450f48b7c87b029ee1d6701357..6d0d03910e0c8c8530cf1d1f06b3917c39c82ef7 100644 (file)
@@ -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)
index 092a0ac8bd4cc0aeffdb9eaaae674b41a0003a6d..8a75cd840062a5ab357fa09d186eef36c2e2a7fe 100644 (file)
@@ -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 *
index 99e75039b8e26aa10d42d5fb9856b128010ff5c5..4a98c96a346aa30d5be0b4aed80f7171367b57c2 100644 (file)
@@ -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.
                         */
index 222a4375142464eb990442251b68085738c1510f..d3dc0c5e69aa274ec426802c7007edfcea2c4c25 100644 (file)
@@ -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.
  */
index e1bcbc708866f374e6c6e7ca03145654e9db9906..9c4fd8cbacd9f7b604db83af0e3cd8a69d7616de 100644 (file)
@@ -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.
  */
index ebd6b8b1468bed0edc50ae75bc32de2f7cffd304..5fbef208f126b7157705edac69cd61f93215f7a3 100644 (file)
@@ -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 *
index 5ab115d0f9f74975e51b4913e652c3c50f0f8927..6ed7de4b84e392e340e9006c97dc3584764a6772 100644 (file)
@@ -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
index cfd3266f363b3ca7a6516d60f53e8f8ef6c8a8b6..88b8139c892affd0fd0d80998548f259e8e46f6d 100644 (file)
@@ -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.
  */
index f86101db0fb59618df213fdda384903baa72e1a0..cd6994c66af0349b54e21d7c97f48d211641b7bd 100644 (file)
@@ -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.
  */