From: Willy Tarreau Date: Fri, 15 May 2026 16:25:13 +0000 (+0200) Subject: CLEANUP: address a few typos and copy-paste errors in httpclient and dns X-Git-Tag: v3.4-dev13~59 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=2f88b4bc4b0eac34d5d868712292a26553b0a8e6;p=haproxy.git CLEANUP: address a few typos and copy-paste errors in httpclient and dns These are either typos or copy-paste mistakes (mostly mouse-induced spaces instead of tabs for dns.c). --- diff --git a/include/haproxy/http_client-t.h b/include/haproxy/http_client-t.h index ef75a336d..1040c1f85 100644 --- a/include/haproxy/http_client-t.h +++ b/include/haproxy/http_client-t.h @@ -17,7 +17,7 @@ struct httpclient { struct buffer buf; /* input buffer, raw HTTP */ } res; struct { - /* callbacks used to send the request, */ + /* callbacks used to send the request, */ void (*req_payload)(struct httpclient *hc); /* send a payload */ /* callbacks used to receive the response, if not set, the IO @@ -28,7 +28,7 @@ struct httpclient { void (*res_end)(struct httpclient *hc); /* end of the response */ } ops; struct sockaddr_storage *dst; /* destination address */ - struct appctx *appctx; /* HTTPclient appctx */ + struct appctx *appctx; /* HTTP client appctx */ int timeout_server; /* server timeout in ms */ void *caller; /* ptr of the caller */ unsigned int flags; /* other flags */ @@ -50,7 +50,7 @@ struct httpclient { #define HTTPCLIENT_FS_ENDED 0x00020000 /* the httpclient is stopped */ /* options */ -#define HTTPCLIENT_O_HTTPPROXY 0x00000001 /* the request must be use an absolute URI */ +#define HTTPCLIENT_O_HTTPPROXY 0x00000001 /* the request must use an absolute URI */ #define HTTPCLIENT_O_RES_HTX 0x00000002 /* response is stored in HTX */ /* States of the HTTP Client Appctx */ @@ -65,4 +65,4 @@ enum { #define HTTPCLIENT_USERAGENT "HAProxy" -#endif /* ! _HAPROXY_HTTCLIENT__T_H */ +#endif /* !_HAPROXY_HTTPCLIENT_T_H */ diff --git a/include/haproxy/http_client.h b/include/haproxy/http_client.h index 93f3fc1af..3ff8c7353 100644 --- a/include/haproxy/http_client.h +++ b/include/haproxy/http_client.h @@ -38,4 +38,4 @@ static inline int httpclient_started(struct httpclient *hc) return !!(hc->flags & HTTPCLIENT_FS_STARTED); } -#endif /* ! _HAPROXY_HTTCLIENT_H */ +#endif /* !_HAPROXY_HTTPCLIENT_H */ diff --git a/src/dns.c b/src/dns.c index 95d40b147..83e0e7821 100644 --- a/src/dns.c +++ b/src/dns.c @@ -194,7 +194,7 @@ int dns_send_nameserver(struct dns_nameserver *ns, void *buf, size_t len) struct ist myist; myist = ist2(buf, len); - ret = dns_ring_write(ns->stream->ring_req, DNS_TCP_MSG_MAX_SIZE, NULL, 0, &myist, 1); + ret = dns_ring_write(ns->stream->ring_req, DNS_TCP_MSG_MAX_SIZE, NULL, 0, &myist, 1); if (!ret) { ns->counters->snd_error++; return -1; @@ -215,7 +215,7 @@ void dns_session_free(struct dns_session *); */ ssize_t dns_recv_nameserver(struct dns_nameserver *ns, void *data, size_t size) { - ssize_t ret = -1; + ssize_t ret = -1; if (ns->dgram) { struct dgram_conn *dgram = &ns->dgram->conn; @@ -1346,8 +1346,8 @@ int dns_stream_init(struct dns_nameserver *ns, struct server *srv) { struct dns_stream_server *dss = NULL; - dss = calloc(1, sizeof(*dss)); - if (!dss) { + dss = calloc(1, sizeof(*dss)); + if (!dss) { ha_alert("memory allocation error initializing dns tcp server '%s'.\n", srv->id); goto out; } @@ -1426,7 +1426,7 @@ int init_dns_buffers() if (!dns_msg_trash) return 0; - return 1; + return 1; } void deinit_dns_buffers() diff --git a/src/http_client.c b/src/http_client.c index 93764472c..8d02f48b6 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -376,7 +376,7 @@ out: * This function tries to destroy the httpclient if it wasn't running. * If it was running, stop the client and ask it to autodestroy itself. * - * Once this function is used, all pointer sto the client must be removed + * Once this function is used, all pointers to the client must be removed * */ void httpclient_stop_and_destroy(struct httpclient *hc)