CLEANUP: Fix typos in the spoe subsystem

Fix typos in the code comments of the spoe subsystem.
This commit is contained in:
Joseph Herlant 2018-11-15 13:46:49 -08:00 committed by Willy Tarreau
parent 757f5ad73a
commit f7f6031184
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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)