From 7c16c0e431f833c0aa8932e3b456481f9b567635 Mon Sep 17 00:00:00 2001 From: Joseph Herlant 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 f33eb8653..08ff90064 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 . If none can be + * Find the first occurrence of a key in the tree . 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 . If none can + * Find the first occurrence of a signed key in the tree . 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 2ab833ffa..6d0d03910 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 . If none can be + * Find the first occurrence of a key in the tree . 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 . If none can + * Find the first occurrence of a signed key in the tree . 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 092a0ac8b..8a75cd840 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 bytes in the tree . +/* Find the first occurrence of a key of bytes in the tree . * If none can be found, return NULL. */ REGPRM3 struct ebpt_node * diff --git a/ebtree/ebimtree.h b/ebtree/ebimtree.h index 99e75039b..4a98c96a3 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 bytes matching in the +/* Find the first occurrence of a key of a least bytes matching in the * tree . The caller is responsible for ensuring that will not exceed * the common parts between the tree's keys and . 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 222a43751..d3dc0c5e6 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 in the tree . +/* Find the first occurrence of a zero-terminated string in the tree . * 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 e1bcbc708..9c4fd8cba 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 string in the tree . +/* Find the first occurrence of a length string in the tree . * 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 in the first 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 in the tree . +/* Find the first occurrence of a zero-terminated string in the tree . * 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 ebd6b8b14..5fbef208f 100644 --- a/ebtree/ebmbtree.c +++ b/ebtree/ebmbtree.c @@ -22,7 +22,7 @@ #include "ebmbtree.h" -/* Find the first occurence of a key of bytes in the tree . +/* Find the first occurrence of a key of bytes in the tree . * 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 in the +/* Find the first occurrence of the longest prefix matching a key in the * tree . It's the caller's responsibility to ensure that key 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 of BITS in the +/* Find the first occurrence of a prefix matching a key of BITS in the * tree . If none can be found, return NULL. */ REGPRM3 struct ebmb_node * diff --git a/ebtree/ebmbtree.h b/ebtree/ebmbtree.h index 5ab115d0f..6ed7de4b8 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 bytes matching in the +/* Find the first occurrence of a key of a least bytes matching in the * tree . The caller is responsible for ensuring that will not exceed * the common parts between the tree's keys and . 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 in the +/* Find the first occurrence of the longest prefix matching a key in the * tree . It's the caller's responsibility to ensure that key 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 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 of BITS in the +/* Find the first occurrence of a prefix matching a key of BITS in the * tree . It's the caller's responsibility to ensure that key 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 which cannot be part of any prefix, typically diff --git a/ebtree/ebsttree.c b/ebtree/ebsttree.c index cfd3266f3..88b8139c8 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 in the tree . +/* Find the first occurrence of a zero-terminated string in the tree . * 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 f86101db0..cd6994c66 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 string in the tree . +/* Find the first occurrence of a length string in the tree . * 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 in the first 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 in the tree . +/* Find the first occurrence of a zero-terminated string in the tree . * 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. */