]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: address a few typos and copy-paste errors in httpclient and dns
authorWilly Tarreau <w@1wt.eu>
Fri, 15 May 2026 16:25:13 +0000 (18:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 May 2026 16:25:13 +0000 (18:25 +0200)
These are either typos or copy-paste mistakes (mostly mouse-induced
spaces instead of tabs for dns.c).

include/haproxy/http_client-t.h
include/haproxy/http_client.h
src/dns.c
src/http_client.c

index ef75a336d1d6ab286e59fc4a46da14315d53b7f6..1040c1f8507d1c7ada1870e00f6f0666e7b19f65 100644 (file)
@@ -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 */
index 93f3fc1af66e0f70b9a78ead7978cd6d9d8ac30e..3ff8c7353ba23883b804b2e31f9d7a00a6498e9f 100644 (file)
@@ -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 */
index 95d40b147622b93472ebc4d0f8fff6b7e018f59d..83e0e7821f9f234349cf21fbfa5ca1001fbbdd7f 100644 (file)
--- 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()
index 93764472c1751f83dd723df10727ddf8d226339a..8d02f48b63b710c4eb2794c8ebeab5c00d77ca1a 100644 (file)
@@ -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 pointerto the client must be removed
  *
  */
 void httpclient_stop_and_destroy(struct httpclient *hc)