mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-12 19:10:00 -04:00
silence win64 possible loss of data
This commit is contained in:
parent
363107b2b0
commit
14b59c9929
1 changed files with 3 additions and 3 deletions
|
|
@ -334,7 +334,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)
|
||||
|
|
@ -356,14 +356,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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue