Hi,

This patch fixes typos in the code comments of the spoe subsystem.

Thanks,
Joseph
From 20610f5c7ee2eaca0de501cc0aab696a21671b75 Mon Sep 17 00:00:00 2001
From: Joseph Herlant <aerosti...@debian.org>
Date: Thu, 15 Nov 2018 13:46:49 -0800
Subject: [PATCH] CLEANUP: Fix typos in the spoe subsystem

Fix typos in the code comments of the spoe subsystem.
---
 include/proto/spoe.h | 4 ++--
 src/flt_spoe.c       | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/proto/spoe.h b/include/proto/spoe.h
index b6c4ee2c..e5b3b4b2 100644
--- a/include/proto/spoe.h
+++ b/include/proto/spoe.h
@@ -61,7 +61,7 @@ spoe_encode_buffer(const char *str, size_t len, char **buf, char *end)
 /* Encode a buffer, possibly partially. It does the same thing than
  * 'spoe_encode_buffer', but if there is not enough space, it does not fail.
  * On success, it returns the number of copied bytes and <*buf> is moved after
- * the encoded value. If an error occured, it returns -1. */
+ * the encoded value. If an error occurred, it returns -1. */
 static inline int
 spoe_encode_frag_buffer(const char *str, size_t len, char **buf, char *end)
 {
@@ -113,7 +113,7 @@ spoe_decode_buffer(char **buf, char *end, char **str, uint64_t *len)
 
 /* Encode a typed data using value in <smp>. On success, it returns the number
  * of copied bytes and <*buf> is moved after the encoded value. If an error
- * occured, it returns -1.
+ * occurred, it returns -1.
  *
  * If the value is too big to be encoded, depending on its type, then encoding
  * failed or the value is partially encoded. Only strings and binaries can be
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index cd0b88a9..2dd26fda 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -383,7 +383,7 @@ spoe_str_to_vsn(const char *str, size_t len)
 }
 
 /* Encode the HELLO frame sent by HAProxy to an agent. It returns the number of
- * encoded bytes in the frame on success, 0 if an encoding error occured and -1
+ * encoded bytes in the frame on success, 0 if an encoding error occurred and -1
  * if a fatal error occurred. */
 static int
 spoe_prepare_hahello_frame(struct appctx *appctx, char *frame, size_t size)
@@ -2179,14 +2179,14 @@ spoe_encode_message(struct stream *s, struct spoe_context *ctx,
 		if (ctx->frag_ctx.curoff != UINT_MAX)
 			goto encode_arg_value;
 
-		/* Encode the arguement name as a string. It can by NULL */
+		/* Encode the argument name as a string. It can by NULL */
 		if (spoe_encode_buffer(arg->name, arg->name_len, buf, end) == -1)
 			goto too_big;
 
 		ctx->frag_ctx.curoff = 0;
 	  encode_arg_value:
 
-		/* Fetch the arguement value */
+		/* Fetch the argument value */
 		smp = sample_process(s->be, s->sess, s, dir|SMP_OPT_FINAL, arg->expr, NULL);
 		ret = spoe_encode_data(smp, &ctx->frag_ctx.curoff, buf, end);
 		if (ret == -1 || ctx->frag_ctx.curoff)
-- 
2.19.1

Reply via email to