]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: dns: dns_resolution structure update: time_t to unsigned int
authorBaptiste Assmann <bedis9@gmail.com>
Thu, 3 Sep 2015 08:55:20 +0000 (10:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 Sep 2015 08:50:17 +0000 (10:50 +0200)
3 variables of the dns_resolution structure are set to 'time_t' type.
Since they are all set by 'now_ms' and used as 'ticks' in HAProxy's
internal, it is safer to set them to the same type than now_ms:
'unsigned int'.

include/types/dns.h

index d5431a5243d6684d82c8f370d626e095f164ce41..d0a835d9b34cd1cdd0614bea0646e3ae487ec10d 100644 (file)
@@ -151,9 +151,9 @@ struct dns_resolution {
        char *hostname_dn;              /* server hostname in domain name label format */
        int hostname_dn_len;            /* server domain name label len */
        int resolver_family_priority;   /* which IP family should the resolver use when both are returned */
-       time_t last_resolution;         /* time of the lastest valid resolution */
-       time_t last_sent_packet;        /* time of the latest DNS packet sent */
-       time_t last_status_change;      /* time of the latest DNS resolution status change */
+       unsigned int last_resolution;   /* time of the lastest valid resolution */
+       unsigned int last_sent_packet;  /* time of the latest DNS packet sent */
+       unsigned int last_status_change;        /* time of the latest DNS resolution status change */
        int query_id;                   /* DNS query ID dedicated for this resolution */
        struct eb32_node qid;           /* ebtree query id */
        int query_type;                 /* query type to send. By default DNS_RTYPE_ANY */