]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: assorted typo fixes in the code and comments
authorIlya Shipitsin <chipitsine@gmail.com>
Wed, 22 Jul 2020 19:32:55 +0000 (00:32 +0500)
committerWilly Tarreau <w@1wt.eu>
Fri, 31 Jul 2020 09:18:07 +0000 (11:18 +0200)
This is 12th iteration of typo fixes

include/haproxy/connection-t.h
include/haproxy/server.h
src/backend.c
src/connection.c
src/flt_trace.c
src/http_ana.c
src/log.c
src/proto_udp.c
src/sample.c

index efeb714fecaa3a31efa7f193c9ca5626b0079998..70119c16a40985ed4d00929cbb7e06270aa72036 100644 (file)
@@ -67,8 +67,8 @@ enum {
 
 
        CS_FL_ERROR         = 0x00000100,  /* a fatal error was reported */
-       CS_FL_RCV_MORE      = 0x00000200,  /* We may have more bytes to transfert */
-       CS_FL_WANT_ROOM     = 0x00000400,  /* More bytes to transfert, but not enough room */
+       CS_FL_RCV_MORE      = 0x00000200,  /* We may have more bytes to transfer */
+       CS_FL_WANT_ROOM     = 0x00000400,  /* More bytes to transfer, but not enough room */
        CS_FL_ERR_PENDING   = 0x00000800,  /* An error is pending, but there's still data to be read */
        CS_FL_EOS           = 0x00001000,  /* End of stream delivered to data layer */
        /* unused: 0x00002000 */
index 269216d30a6b0c11b26b996e9fda83112006f34e..f15b7057db91e4455723a7b8ca2d5538b821525e 100644 (file)
@@ -273,7 +273,7 @@ static inline void srv_del_conn_from_list(struct server *srv, struct connection
                _HA_ATOMIC_SUB(&srv->curr_idle_thr[tid], 1);
        }
        else {
-               /* The connction is not private and not in any server's idle
+               /* The connection is not private and not in any server's idle
                 * list, so decrement the current number of used connections
                 */
                _HA_ATOMIC_SUB(&srv->curr_used_conns, 1);
index 28ec547f701a18bd3bc6f78c6ed944d3a8b210d1..46d834f740cbfdbde59634fdf265263ddc5e6ac3 100644 (file)
@@ -1512,7 +1512,7 @@ int connect_server(struct stream *s)
                    !(srv_conn->flags & CO_FL_PRIVATE) && srv_conn->mux->avail_streams(srv_conn) > 0)
                        LIST_ADDQ(&srv->available_conns[tid], mt_list_to_list(&srv_conn->list));
                else if (srv_conn->flags & CO_FL_PRIVATE) {
-                       /* If it fail now, the same will be done in mux->detach() callack */
+                       /* If it fail now, the same will be done in mux->detach() callback */
                        session_add_conn(srv_conn->owner, srv_conn, srv_conn->target);
                }
        }
index 57160e711da4e9e987c862527e555c4d7ade38ed..9c017bcf901a4b0d1927892162430503b1509f0e 100644 (file)
@@ -71,7 +71,7 @@ int conn_create_mux(struct connection *conn)
                    !(conn->flags & CO_FL_PRIVATE) && conn->mux->avail_streams(conn) > 0)
                        LIST_ADDQ(&srv->available_conns[tid], mt_list_to_list(&conn->list));
                else if (conn->flags & CO_FL_PRIVATE) {
-                       /* If it fail now, the same will be done in mux->detach() callack */
+                       /* If it fail now, the same will be done in mux->detach() callback */
                        session_add_conn(conn->owner, conn, conn->target);
                }
                return 0;
index f9fd24820af76e0bc34cf386f371a48124158ed4..386de41d2912c5d61d95f850929eaba1247afb84 100644 (file)
@@ -195,7 +195,7 @@ trace_init(struct proxy *px, struct flt_conf *fconf)
        return 0;
 }
 
-/* Free ressources allocated by the trace filter. */
+/* Free resources allocated by the trace filter. */
 static void
 trace_deinit(struct proxy *px, struct flt_conf *fconf)
 {
@@ -227,7 +227,7 @@ trace_init_per_thread(struct proxy *px, struct flt_conf *fconf)
        return 0;
 }
 
-/* Free ressources allocate by the trace filter for each thread. */
+/* Free resources allocate by the trace filter for each thread. */
 static void
 trace_deinit_per_thread(struct proxy *px, struct flt_conf *fconf)
 {
index ae7d822a1a06568e96f099b46987884bd39a87f1..ac2990e99fa15b4c4635ba51c0ea94f567e2c7fa 100644 (file)
@@ -1842,7 +1842,7 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                                sess->flags |= SESS_FL_PREFER_LAST;
                                conn_set_owner(srv_conn, sess, NULL);
                                conn_set_private(srv_conn);
-                               /* If it fail now, the same will be done in mux->detach() callack */
+                               /* If it fail now, the same will be done in mux->detach() callback */
                                session_add_conn(srv_conn->owner, srv_conn, srv_conn->target);
                                break;
                        }
index 495a672d24ee5a631dc3f7f89bab5b2d6c46c41f..5f1f96e5182a10c647165e65e0151a2fd39d7105 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -1435,7 +1435,7 @@ void send_log(struct proxy *p, int level, const char *format, ...)
  * settings.
  * This function returns a struct ist array of elements of the header
  * nbelem is set to the number of available elements.
- * Thos function returns currently a maximum of NB_LOG_HDR_IST_ELEMENTS
+ * This function returns currently a maximum of NB_LOG_HDR_IST_ELEMENTS
  * elements.
  */
 struct ist *build_log_header(enum log_fmt format, int level, int facility,
@@ -1520,7 +1520,7 @@ struct ist *build_log_header(enum log_fmt format, int level, int facility,
                        if (metadata && metadata[LOG_META_TIME].len == LOG_LEGACYTIME_LEN) {
                                hdr_ctx.ist_vector[(*nbelem)++] = metadata[LOG_META_TIME];
                                hdr_ctx.ist_vector[(*nbelem)++] = ist2(" ", 1);
-                               /* time is set, break immediatly */
+                               /* time is set, break immediately */
                                break;
                        }
                        else if (metadata && metadata[LOG_META_TIME].len >= LOG_ISOTIME_MINLEN) {
@@ -1577,7 +1577,7 @@ struct ist *build_log_header(enum log_fmt format, int level, int facility,
                        /* adds rfc5425 version prefix */
                        hdr_ctx.ist_vector[(*nbelem)++] = ist2("1 ", 2);
                        if (metadata && metadata[LOG_META_TIME].len == 1 && metadata[LOG_META_TIME].ptr[0] == '-') {
-                               /* submited len is NILVALUE, it is a valid timestamp for rfc5425 */
+                               /* submitted len is NILVALUE, it is a valid timestamp for rfc5425 */
                                hdr_ctx.ist_vector[(*nbelem)++] = metadata[LOG_META_TIME];
                                hdr_ctx.ist_vector[(*nbelem)++] = ist2(" ", 1);
                                break;
@@ -1593,7 +1593,7 @@ struct ist *build_log_header(enum log_fmt format, int level, int facility,
                        if (metadata && metadata[LOG_META_TIME].len >= LOG_ISOTIME_MINLEN) {
                                hdr_ctx.ist_vector[(*nbelem)++] = metadata[LOG_META_TIME];
                                hdr_ctx.ist_vector[(*nbelem)++] = ist2(" ", 1);
-                               /* time is set, break immediatly */
+                               /* time is set, break immediately */
                                break;
                        }
                        else if (metadata && metadata[LOG_META_TIME].len == LOG_LEGACYTIME_LEN) {
@@ -1628,7 +1628,7 @@ struct ist *build_log_header(enum log_fmt format, int level, int facility,
                                                hdr_ctx.ist_vector[(*nbelem)++] = ist2(&hdr_ctx.timestamp_buffer[0], len);
                                                /* adds HH:MM:SS from legacy timestamp */
                                                hdr_ctx.ist_vector[(*nbelem)++] = ist2(&timestamp[7], 8);
-                                               /* skip secfraq because optionnal */
+                                               /* skip secfraq because it is optional */
                                                /* according to rfc: -00:00 means we don't know the timezone */
                                                hdr_ctx.ist_vector[(*nbelem)++] = ist2("-00:00 ", 7);
                                                /* we successfully reuse legacy time, we can break */
@@ -3239,7 +3239,7 @@ void parse_log_message(char *buf, size_t buflen, int *level, int *facility,
                else if (*size > LOG_ISOTIME_MINLEN) {
                        metadata[LOG_META_TIME].ptr = p;
 
-                       /* check if optionnal secfrac is present
+                       /* check if optional secfrac is present
                         * in timestamp.
                         * possible format are:
                         * ex: '1970-01-01T00:00:00.000000Z'
@@ -3471,7 +3471,7 @@ void parse_log_message(char *buf, size_t buflen, int *level, int *facility,
                if (!metadata[LOG_META_TAG].len)
                        metadata[LOG_META_TAG].len = p - metadata[LOG_META_TAG].ptr;
 
-               /* let pass ':' and ' ', we still have warranty size is large enought */
+               /* let pass ':' and ' ', we still have warranty size is large enough */
                p += 2;
 
                buflen -= p - buf;
index 6defe7e342e99efb2c9aff88e86fc93d8fc3cd88..e2a854d2107a4bed62767db16982b84cb09e4aac 100644 (file)
@@ -197,7 +197,7 @@ int udp_bind_listener(struct listener *listener, char *errmsg, int errlen)
 
        /* TODO: Implement reuse fd. Take care that to identify fd to reuse
         * listeners uses a special AF_CUST_ family and we MUST consider
-        * IPPROTO (sockaddr is not enought
+        * IPPROTO (sockaddr is not enough)
         */
 
        fd = my_socketat(listener->netns, listener->proto->sock_family, listener->proto->sock_type, listener->proto->sock_prot);
index 5b1651fc5c5e454f34b07b86f817c6ff89d09f72..68b52acea19b34b5254b6b301e1d1dc37c525afa 100644 (file)
@@ -3649,7 +3649,7 @@ static int smp_check_const_meth(struct arg *args, char **err)
                args[0].type = ARGT_SINT;
                args[0].data.sint = meth;
        } else {
-               /* Check method avalaibility. A methos is a token defined as :
+               /* Check method avalaibility. A method is a token defined as :
                 * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
                 *         "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
                 * token = 1*tchar