From: Ilya Shipitsin Date: Wed, 22 Jul 2020 19:32:55 +0000 (+0500) Subject: CLEANUP: assorted typo fixes in the code and comments X-Git-Tag: v2.3-dev2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b79f38a7a0a5e24387658478edf14c9c9394d47;p=thirdparty%2Fhaproxy.git CLEANUP: assorted typo fixes in the code and comments This is 12th iteration of typo fixes --- diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index efeb714fec..70119c16a4 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -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 */ diff --git a/include/haproxy/server.h b/include/haproxy/server.h index 269216d30a..f15b7057db 100644 --- a/include/haproxy/server.h +++ b/include/haproxy/server.h @@ -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); diff --git a/src/backend.c b/src/backend.c index 28ec547f70..46d834f740 100644 --- a/src/backend.c +++ b/src/backend.c @@ -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); } } diff --git a/src/connection.c b/src/connection.c index 57160e711d..9c017bcf90 100644 --- a/src/connection.c +++ b/src/connection.c @@ -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; diff --git a/src/flt_trace.c b/src/flt_trace.c index f9fd24820a..386de41d29 100644 --- a/src/flt_trace.c +++ b/src/flt_trace.c @@ -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) { diff --git a/src/http_ana.c b/src/http_ana.c index ae7d822a1a..ac2990e99f 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -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; } diff --git a/src/log.c b/src/log.c index 495a672d24..5f1f96e518 100644 --- 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(×tamp[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; diff --git a/src/proto_udp.c b/src/proto_udp.c index 6defe7e342..e2a854d210 100644 --- a/src/proto_udp.c +++ b/src/proto_udp.c @@ -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); diff --git a/src/sample.c b/src/sample.c index 5b1651fc5c..68b52acea1 100644 --- a/src/sample.c +++ b/src/sample.c @@ -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