Commit ff711c86 authored by Evan Hunt's avatar Evan Hunt

[master] change strtoll() to isc_string_touint64() for portability

parent 612b2e2c
......@@ -1276,8 +1276,9 @@ remove_old_tsversions(isc_logfile_t *file, int versions) {
strncmp(dir.entry.name, bname, bnamelen) == 0 &&
dir.entry.name[bnamelen] == '.')
{
version = strtoll(&dir.entry.name[bnamelen + 1],
&digit_end, 10);
char *ename = &dir.entry.name[bnamelen + 1];
version = isc_string_touint64(ename,
&digit_end, 10);
if (*digit_end == '\0') {
int i = 0;
while (version < to_keep[i] &&
......@@ -1311,8 +1312,8 @@ remove_old_tsversions(isc_logfile_t *file, int versions) {
strncmp(dir.entry.name, bname, bnamelen) == 0 &&
dir.entry.name[bnamelen] == '.')
{
version = strtoll(&dir.entry.name[bnamelen + 1],
&digit_end, 10);
char *ename = &dir.entry.name[bnamelen + 1];
version = isc_string_touint64(ename, &digit_end, 10);
/*
* Remove any backup files that exceed versions.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment