]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: Fix typos in the sample subsystem
authorJoseph Herlant <aerostitch@debian.org>
Thu, 15 Nov 2018 20:14:56 +0000 (12:14 -0800)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 21:26:42 +0000 (22:26 +0100)
Fix some typos in the code comment of the sample subsystem.

include/proto/sample.h
src/sample.c

index 4fb5babf4dffd233ee593577706ec94762763582..606dcb62a1445d2de94cdee9d58371446e0ae2c1 100644 (file)
@@ -51,7 +51,7 @@ int smp_dup(struct sample *smp);
 
 /*
  * This function just apply a cast on sample. It returns 0 if the cast is not
- * avalaible or if the cast fails, otherwise returns 1. It does not modify the
+ * available or if the cast fails, otherwise returns 1. It does not modify the
  * input sample on failure.
  */
 static inline
index 138390d9db8dc9f486323dd0ba8225f4ec72d2c0..659c5f892ad0de7321c367b270f946bce9890d21 100644 (file)
@@ -639,7 +639,7 @@ static int c_int2str(struct sample *smp)
        return 1;
 }
 
-/* This function inconditionally duplicates data and removes the "const" flag.
+/* This function unconditionally duplicates data and removes the "const" flag.
  * For strings and binary blocks, it also provides a known allocated size with
  * a length that is capped to the size, and ensures a trailing zero is always
  * appended for strings. This is necessary for some operations which may
@@ -2354,7 +2354,7 @@ static int sample_conv_binary_cpl(const struct arg *arg_p, struct sample *smp, v
 }
 
 /* Takes a SINT on input, applies a binary "and" with the SINT directly in
- * arg_p or in the varaible described in arg_p, and returns the SINT result.
+ * arg_p or in the variable described in arg_p, and returns the SINT result.
  */
 static int sample_conv_binary_and(const struct arg *arg_p, struct sample *smp, void *private)
 {
@@ -2368,7 +2368,7 @@ static int sample_conv_binary_and(const struct arg *arg_p, struct sample *smp, v
 }
 
 /* Takes a SINT on input, applies a binary "or" with the SINT directly in
- * arg_p or in the varaible described in arg_p, and returns the SINT result.
+ * arg_p or in the variable described in arg_p, and returns the SINT result.
  */
 static int sample_conv_binary_or(const struct arg *arg_p, struct sample *smp, void *private)
 {
@@ -2382,7 +2382,7 @@ static int sample_conv_binary_or(const struct arg *arg_p, struct sample *smp, vo
 }
 
 /* Takes a SINT on input, applies a binary "xor" with the SINT directly in
- * arg_p or in the varaible described in arg_p, and returns the SINT result.
+ * arg_p or in the variable described in arg_p, and returns the SINT result.
  */
 static int sample_conv_binary_xor(const struct arg *arg_p, struct sample *smp, void *private)
 {
@@ -2422,7 +2422,7 @@ static inline long long int arith_add(long long int a, long long int b)
 }
 
 /* Takes a SINT on input, applies an arithmetic "add" with the SINT directly in
- * arg_p or in the varaible described in arg_p, and returns the SINT result.
+ * arg_p or in the variable described in arg_p, and returns the SINT result.
  */
 static int sample_conv_arith_add(const struct arg *arg_p, struct sample *smp, void *private)
 {
@@ -2436,7 +2436,7 @@ static int sample_conv_arith_add(const struct arg *arg_p, struct sample *smp, vo
 }
 
 /* Takes a SINT on input, applies an arithmetic "sub" with the SINT directly in
- * arg_p or in the varaible described in arg_p, and returns the SINT result.
+ * arg_p or in the variable described in arg_p, and returns the SINT result.
  */
 static int sample_conv_arith_sub(const struct arg *arg_p,
                                  struct sample *smp, void *private)
@@ -2458,7 +2458,7 @@ static int sample_conv_arith_sub(const struct arg *arg_p,
                return 1;
        }
 
-       /* standard substraction: we use the "add" function and negate
+       /* standard subtraction: we use the "add" function and negate
         * the second operand.
         */
        smp->data.u.sint = arith_add(smp->data.u.sint, -tmp.data.u.sint);
@@ -2466,7 +2466,7 @@ static int sample_conv_arith_sub(const struct arg *arg_p,
 }
 
 /* Takes a SINT on input, applies an arithmetic "mul" with the SINT directly in
- * arg_p or in the varaible described in arg_p, and returns the SINT result.
+ * arg_p or in the variable described in arg_p, and returns the SINT result.
  * If the result makes an overflow, then the largest possible quantity is
  * returned.
  */
@@ -2511,7 +2511,7 @@ static int sample_conv_arith_mul(const struct arg *arg_p,
 }
 
 /* Takes a SINT on input, applies an arithmetic "div" with the SINT directly in
- * arg_p or in the varaible described in arg_p, and returns the SINT result.
+ * arg_p or in the variable described in arg_p, and returns the SINT result.
  * If arg_p makes the result overflow, then the largest possible quantity is
  * returned.
  */
@@ -2540,7 +2540,7 @@ static int sample_conv_arith_div(const struct arg *arg_p,
 }
 
 /* Takes a SINT on input, applies an arithmetic "mod" with the SINT directly in
- * arg_p or in the varaible described in arg_p, and returns the SINT result.
+ * arg_p or in the variable described in arg_p, and returns the SINT result.
  * If arg_p makes the result overflow, then 0 is returned.
  */
 static int sample_conv_arith_mod(const struct arg *arg_p,