]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence win64 possible loss of data
authorMark Andrews <marka@isc.org>
Mon, 23 Jun 2014 04:00:15 +0000 (14:00 +1000)
committerMark Andrews <marka@isc.org>
Mon, 23 Jun 2014 06:36:25 +0000 (16:36 +1000)
bin/dnssec/dnssectool.c

index 40af82962b3567455d4075698233d6938e0cc4dd..b9e6960c99bf782ae68965ba011330d1171e621a 100644 (file)
@@ -309,7 +309,7 @@ strtotime(const char *str, isc_int64_t now, isc_int64_t base,
        isc_result_t result;
        const char *orig = str;
        char *endp;
-       int n;
+       size_t n;
 
        if (isnone(str)) {
                if (setp != NULL)
@@ -331,14 +331,14 @@ strtotime(const char *str, isc_int64_t now, isc_int64_t base,
         *   [+-]offset
         */
        n = strspn(str, "0123456789");
-       if ((n == 8 || n == 14) &&
+       if ((n == 8u || n == 14u) &&
            (str[n] == '\0' || str[n] == '-' || str[n] == '+'))
        {
                char timestr[15];
 
                strlcpy(timestr, str, sizeof(timestr));
                timestr[n] = 0;
-               if (n == 8)
+               if (n == 8u)
                        strlcat(timestr, "000000", sizeof(timestr));
                result = dns_time64_fromtext(timestr, &val);
                if (result != ISC_R_SUCCESS)