]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: Fix typos in the dns subsystem
authorJoseph Herlant <aerostitch@debian.org>
Thu, 15 Nov 2018 18:33:28 +0000 (10:33 -0800)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 21:23:15 +0000 (22:23 +0100)
Fix misspells in the code comments of the dns subsystem.

include/types/dns.h
src/dns.c

index 488d3996cb5c45932f76cd69c9150d8c16b03c99..d7afe02cd859f7e2695dc9d993ac9e0bb9a0cec2 100644 (file)
@@ -88,7 +88,7 @@
 #define DNS_FLAG_TRUNCATED      0x0200  /* mask for truncated flag */
 #define DNS_FLAG_REPLYCODE      0x000F  /* mask for reply code */
 
-/* max number of network preference entries are avalaible from the
+/* max number of network preference entries are available from the
  * configuration file.
  */
 #define SRV_MAX_PREF_NET 5
@@ -244,7 +244,7 @@ struct dns_options {
                        struct in6_addr in6;
                } mask;
        } pref_net[SRV_MAX_PREF_NET];
-       int pref_net_nb; /* The number of registered prefered networks. */
+       int pref_net_nb; /* The number of registered preferred networks. */
        int accept_duplicate_ip; /* flag to indicate whether the associated object can use an IP address
                                    already set to an other object of the same group */
 };
@@ -265,7 +265,7 @@ struct dns_resolution {
        unsigned int          last_valid;          /* time of the last valid response */
        int                   query_id;            /* DNS query ID dedicated for this resolution */
        struct eb32_node      qid;                 /* ebtree query id */
-       int                   prefered_query_type; /* prefered query type */
+       int                   prefered_query_type; /* preferred query type */
        int                   query_type;          /* current query type  */
        int                   status;              /* status of the resolution being processed RSLV_STATUS_* */
        int                   step;                /* RSLV_STEP_* */
@@ -292,7 +292,7 @@ struct dns_requester {
 
 /* Last resolution status code */
 enum {
-       RSLV_STATUS_NONE = 0,  /* no resolution occured yet */
+       RSLV_STATUS_NONE = 0,  /* no resolution occurred yet */
        RSLV_STATUS_VALID,     /* no error */
        RSLV_STATUS_INVALID,   /* invalid responses */
        RSLV_STATUS_ERROR,     /* error */
index 57bec21dcbce38c2a74cf58d92ad1260152170b5..5bce18b030a2bdd18403b357cc9e8aec795ff7d2 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -974,14 +974,14 @@ int dns_get_ip_from_response(struct dns_response_packet *dns_p,
        max_score         = -1;
 
        /* Select an IP regarding configuration preference.
-        * Top priority is the prefered network ip version,
-        * second priority is the prefered network.
+        * Top priority is the preferred network ip version,
+        * second priority is the preferred network.
         * the last priority is the currently used IP,
         *
         * For these three priorities, a score is calculated. The
         * weight are:
-        *  8 - prefered ip version.
-        *  4 - prefered network.
+        *  8 - preferred ip version.
+        *  4 - preferred network.
         *  2 - if the ip in the record is not affected to any other server in the same backend (duplication)
         *  1 - current ip.
         * The result with the biggest score is returned.
@@ -1003,11 +1003,11 @@ int dns_get_ip_from_response(struct dns_response_packet *dns_p,
                        continue;
                score = 0;
 
-               /* Check for prefered ip protocol. */
+               /* Check for preferred ip protocol. */
                if (ip_type == family_priority)
                        score += 8;
 
-               /* Check for prefered network. */
+               /* Check for preferred network. */
                for (j = 0; j < dns_opts->pref_net_nb; j++) {
 
                        /* Compare only the same adresses class. */