From: Thayne McCombs Date: Fri, 8 Jan 2021 04:35:52 +0000 (-0700) Subject: CLEANUP: Fix spelling errors in comments X-Git-Tag: v2.4-dev6~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f0cc5c4bafc767ca607876ec27c58097197ac15;p=thirdparty%2Fhaproxy.git CLEANUP: Fix spelling errors in comments This is from the output of codespell. It's done at once over a bunch of files and only affects comments, so there is nothing user-visible. No backport needed. --- diff --git a/Makefile b/Makefile index 1e383f4647..27d56451cd 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ # USE_TPROXY : enable transparent proxy. Automatic. # USE_LINUX_TPROXY : enable full transparent proxy. Automatic. # USE_LINUX_SPLICE : enable kernel 2.6 splicing. Automatic. -# USE_LIBCRYPT : enable crypted passwords using -lcrypt +# USE_LIBCRYPT : enable encrypted passwords using -lcrypt # USE_CRYPT_H : set it if your system requires including crypt.h # USE_GETADDRINFO : use getaddrinfo() to resolve IPv6 host names. # USE_OPENSSL : enable use of OpenSSL. Recommended, but see below. @@ -435,7 +435,7 @@ endif ifeq ($(TARGET),cygwin) set_target_defaults = $(call default_opts, \ USE_POLL USE_TPROXY USE_OBSOLETE_LINKER) - # Cygwin adds IPv6 support only in version 1.7 (in beta right now). + # Cygwin adds IPv6 support only in version 1.7 (in beta right now). TARGET_CFLAGS = $(if $(filter 1.5.%, $(shell uname -r)), -DUSE_IPV6 -DAF_INET6=23 -DINET6_ADDRSTRLEN=46, ) endif diff --git a/include/haproxy/action-t.h b/include/haproxy/action-t.h index 2ea524db29..045bfd384b 100644 --- a/include/haproxy/action-t.h +++ b/include/haproxy/action-t.h @@ -66,9 +66,9 @@ enum act_flag { /* known actions to be used without any action function pointer. This enum is - * typically used in a switch case, iff .action_ptr is undefined. So if an - * action function is defined for one of following action types, the function - * have the priority over the switch. + * typically used in a switch case, if and only if .action_ptr is undefined. So + * if an action function is defined for one of following action types, the + * function have the priority over the switch. */ enum act_name { ACT_CUSTOM = 0, diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index 0a3af4418a..91048d5288 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -194,8 +194,8 @@ enum { enum { CO_ER_NONE, /* no error */ - CO_ER_CONF_FDLIM, /* reached process' configured FD limitation */ - CO_ER_PROC_FDLIM, /* reached process' FD limitation */ + CO_ER_CONF_FDLIM, /* reached process's configured FD limitation */ + CO_ER_PROC_FDLIM, /* reached process's FD limitation */ CO_ER_SYS_FDLIM, /* reached system's FD limitation */ CO_ER_SYS_MEMLIM, /* reached system buffers limitation */ CO_ER_NOPROTO, /* protocol not supported */ diff --git a/include/haproxy/listener.h b/include/haproxy/listener.h index 8200395db1..44213630f6 100644 --- a/include/haproxy/listener.h +++ b/include/haproxy/listener.h @@ -74,7 +74,7 @@ void dequeue_proxy_listeners(struct proxy *px); /* This function closes the listening socket for the specified listener, * provided that it's already in a listening state. The listener enters the * LI_ASSIGNED state, except if the FD is not closed, in which case it may - * remain in LI_LISTEN. Depending on the process' status (master or worker), + * remain in LI_LISTEN. Depending on the process's status (master or worker), * the listener's bind options and the receiver's origin, it may or may not * close the receiver's FD. Must be called with the lock held. */ diff --git a/include/haproxy/proxy-t.h b/include/haproxy/proxy-t.h index e62b797654..bafe9402df 100644 --- a/include/haproxy/proxy-t.h +++ b/include/haproxy/proxy-t.h @@ -137,7 +137,7 @@ enum PR_SRV_STATE_FILE { #define PR_O2_SRC_ADDR 0x00100000 /* get the source ip and port for logs */ -#define PR_O2_FAKE_KA 0x00200000 /* pretend we do keep-alive with server eventhough we close */ +#define PR_O2_FAKE_KA 0x00200000 /* pretend we do keep-alive with server even though we close */ /* unused : 0x00400000..0x80000000 */ /* server health checks */ diff --git a/include/haproxy/server-t.h b/include/haproxy/server-t.h index 3107e04825..68463c57c3 100644 --- a/include/haproxy/server-t.h +++ b/include/haproxy/server-t.h @@ -262,7 +262,7 @@ struct server { unsigned iweight,uweight, cur_eweight; /* initial weight, user-specified weight, and effective weight */ unsigned wscore; /* weight score, used during srv map computation */ unsigned next_eweight; /* next pending eweight to commit */ - unsigned rweight; /* remainer of weight in the current LB tree */ + unsigned rweight; /* remainder of weight in the current LB tree */ unsigned cumulative_weight; /* weight of servers prior to this one in the same group, for chash balancing */ unsigned npos, lpos; /* next and last positions in the LB tree */ struct eb32_node lb_node; /* node used for tree-based load balancing */ diff --git a/include/import/ebmbtree.h b/include/import/ebmbtree.h index a01062494a..23ef5541fd 100644 --- a/include/import/ebmbtree.h +++ b/include/import/ebmbtree.h @@ -465,7 +465,7 @@ static forceinline struct ebmb_node *__ebmb_lookup_longest(struct eb_root *root, } not_found: - /* Walk down last cover tre if it exists. It does not matter if cover is NULL */ + /* Walk down last cover tree if it exists. It does not matter if cover is NULL */ return ebmb_entry(eb_walk_down(cover, EB_LEFT), struct ebmb_node, node); } diff --git a/src/backend.c b/src/backend.c index 2f2808a810..e3170ee9b4 100644 --- a/src/backend.c +++ b/src/backend.c @@ -2193,7 +2193,7 @@ void back_handle_st_rdy(struct stream *s) DBG_TRACE_ENTER(STRM_EV_STRM_PROC|STRM_EV_SI_ST, s); /* We know the connection at least succeeded, though it could have * since met an error for any other reason. At least it didn't time out - * eventhough the timeout might have been reported right after success. + * even though the timeout might have been reported right after success. * We need to take care of various situations here : * - everything might be OK. We have to switch to established. * - an I/O error might have been reported after a successful transfer, diff --git a/src/fd.c b/src/fd.c index ccdefc6769..6d850e725d 100644 --- a/src/fd.c +++ b/src/fd.c @@ -62,7 +62,7 @@ * | +----------+ * | | ^ * | may | | - * | v | EAGAIN (cant) + * | v | EAGAIN (can't) * | +--------+ * | | READY | (READY=1, ACTIVE=1) * | +--------+ diff --git a/src/haproxy.c b/src/haproxy.c index a28b45fb90..fb73c54440 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1469,7 +1469,7 @@ static int compute_ideal_maxsock(int maxconn) return maxsock; } -/* Tests if it is possible to set the current process' RLIMIT_NOFILE to +/* Tests if it is possible to set the current process's RLIMIT_NOFILE to * , then sets it back to the previous value. Returns non-zero if the * value is accepted, non-zero otherwise. This is used to determine if an * automatic limit may be applied or not. When it is not, the caller knows that diff --git a/src/hlua.c b/src/hlua.c index 8ad9e9f4a3..1893511f4a 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -3902,7 +3902,7 @@ __LJMP static int hlua_applet_tcp_getline_yield(lua_State *L, int status, lua_KC if (ret == 1) len2 = 0; - /* dont check the max length read and dont check. */ + /* don't check the max length read and don't check. */ luaL_addlstring(&appctx->b, blk1, len1); luaL_addlstring(&appctx->b, blk2, len2); @@ -4666,7 +4666,7 @@ __LJMP static int hlua_applet_http_addheader(lua_State *L) WILL_LJMP(lua_error(L)); } - /* Now the top od thestack is an array of values. We push + /* Now the top of thestack is an array of values. We push * the header value as new entry. */ lua_pushvalue(L, 3); @@ -4838,7 +4838,7 @@ __LJMP static int hlua_applet_http_send_response(lua_State *L) } sl->flags |= flags; - /* If we dont have a content-length set, and the HTTP version is 1.1 + /* If we don't have a content-length set, and the HTTP version is 1.1 * and the status code implies the presence of a message body, we must * announce a transfer encoding chunked. This is required by haproxy * for the keepalive compliance. If the applet announces a transfer-encoding @@ -6110,7 +6110,7 @@ __LJMP static int hlua_txn_reply_add_header(lua_State *L) WILL_LJMP(lua_error(L)); } - /* Now the top od thestack is an array of values. We push + /* Now the top of thestack is an array of values. We push * the header value as new entry. */ lua_pushstring(L, value); @@ -7699,7 +7699,7 @@ __LJMP static int hlua_register_action(lua_State *L) WILL_LJMP(luaL_error(L, "Lua out of memory error.")); fcn->function_ref[hlua_state_id] = ref; - /* Set the expected number od arguments. */ + /* Set the expected number of arguments. */ fcn->nargs = nargs; /* List head */ @@ -8480,7 +8480,7 @@ int hlua_post_init_state(lua_State *L) case LUA_ERRERR: kind = "message handler error"; - /* Fall thru */ + /* Fall through */ case LUA_ERRRUN: if (!kind) kind = "runtime error"; @@ -8498,12 +8498,12 @@ int hlua_post_init_state(lua_State *L) default: /* Unknown error */ kind = "Unknown error"; - /* Fall thru */ + /* Fall through */ case LUA_YIELD: /* yield is not configured at this step, this state doesn't happen */ if (!kind) kind = "yield not allowed"; - /* Fall thru */ + /* Fall through */ case LUA_ERRMEM: if (!kind) kind = "out of memory error"; diff --git a/src/http.c b/src/http.c index d331699568..8e38b0c629 100644 --- a/src/http.c +++ b/src/http.c @@ -818,7 +818,7 @@ const char *http_find_url_param_pos(const char **chunks, * comparison is performed in two parts. */ - /* This is the end, we dont have any other chunk. */ + /* This is the end, we don't have any other chunk. */ if (bufs != chunks || !bufs[2]) return NULL; diff --git a/src/http_act.c b/src/http_act.c index 9a49368782..dee738b63f 100644 --- a/src/http_act.c +++ b/src/http_act.c @@ -754,7 +754,7 @@ static int check_http_res_capture(struct act_rule *rule, struct proxy *px, char /* parse an "http-response capture" action. It takes a single argument which is * a sample fetch expression. It stores the expression into arg->act.p[0] and - * the allocated hdr_cap struct od the preallocated id into arg->act.p[1]. + * the allocated hdr_cap struct of the preallocated id into arg->act.p[1]. * It returns ACT_RET_PRS_OK on success, ACT_RET_PRS_ERR on error. */ static enum act_parse_ret parse_http_res_capture(const char **args, int *orig_arg, struct proxy *px, diff --git a/src/htx.c b/src/htx.c index 91acee54f0..3370cd34e4 100644 --- a/src/htx.c +++ b/src/htx.c @@ -147,14 +147,14 @@ static struct htx_blk *htx_reserve_nxblk(struct htx *htx, uint32_t blksz) else goto defrag; - /* Now, we have found the block's position. Try do find where to put its + /* Now, we have found the block's position. Try to find where to put its * payload. The free space is split in two areas: * - * * The free space in front of the blocks table. This one is used iff - * the other one was not used yet. + * * The free space in front of the blocks table. This one is used if and + * only if the other one was not used yet. * * * The free space at the beginning of the message. Once this one is - * used, the other one is never used again, until the next defrag. + * used, the other one is never used again, until the next defrag. */ headroom = (htx->end_addr - htx->head_addr); tailroom = (!htx->head_addr ? htx_pos_to_addr(htx, tail) - htx->tail_addr : 0); diff --git a/src/pattern.c b/src/pattern.c index 7c260f3d02..0b3bea27df 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -997,7 +997,7 @@ struct pattern *pat_match_ip(struct sample *smp, struct pattern_expr *expr, int return &static_pattern; } - /* The IPv4 sample dont match the IPv4 tree. Convert the IPv4 + /* The IPv4 sample don't match the IPv4 tree. Convert the IPv4 * sample address to IPv6 with the mapping method using the ::ffff: * prefix, and try to lookup in the IPv6 tree. */ @@ -2560,7 +2560,7 @@ int pattern_read_from_file(struct pattern_head *head, unsigned int refflags, } /* This function executes a pattern match on a sample. It applies pattern - * to sample . The function returns NULL if the sample dont match. It returns + * to sample . The function returns NULL if the sample don't match. It returns * non-null if the sample match. If is true and the sample match, the * function returns the matched pattern. In many cases, this pattern can be a * static buffer. diff --git a/src/proxy.c b/src/proxy.c index a47c2f67e3..8b2cf4f14d 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -421,7 +421,7 @@ static int proxy_parse_declare(char **args, int section, struct proxy *curpx, return -1; } - /* Capture keywork is only available in frontend. */ + /* Capture keyword is only available in frontend. */ if (!(curpx->cap & PR_CAP_FE)) { memprintf(err, "'%s' only available in frontend or listen section", args[0]); return -1; diff --git a/src/stream_interface.c b/src/stream_interface.c index 80dacc07c7..2fc56b8e65 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -295,7 +295,7 @@ static void stream_int_chk_snd(struct stream_interface *si) } /* Register an applet to handle a stream_interface as a new appctx. The SI will - * wake it up everytime it is solicited. The appctx must be deleted by the task + * wake it up every time it is solicited. The appctx must be deleted by the task * handler using si_release_endpoint(), possibly from within the function itself. * It also pre-initializes the applet's context and returns it (or NULL in case * it could not be allocated). @@ -831,7 +831,7 @@ void si_update_rx(struct stream_interface *si) } else { /* (re)start reading and update timeout. Note: we don't recompute the timeout - * everytime we get here, otherwise it would risk never to expire. We only + * every time we get here, otherwise it would risk never to expire. We only * update it if is was not yet set. The stream socket handler will already * have updated it if there has been a completed I/O. */ @@ -874,7 +874,7 @@ void si_update_tx(struct stream_interface *si) } /* (re)start writing and update timeout. Note: we don't recompute the timeout - * everytime we get here, otherwise it would risk never to expire. We only + * every time we get here, otherwise it would risk never to expire. We only * update it if is was not yet set. The stream socket handler will already * have updated it if there has been a completed I/O. */