diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -257,6 +257,8 @@ ret = (int)strtol(buf, NULL, 10); if (ret == 0 && (errno == EINVAL || errno == ERANGE)) logmsg(LOG_WARNING, "invalid value found in bounds, using 0"); + if (maxdumps > 0 && ret == maxdumps) + ret = 0; fclose(fp); return (ret); } @@ -721,9 +723,6 @@ return; } - if (maxdumps > 0 && bounds == maxdumps) - bounds = 0; - if (buf == NULL) { buf = malloc(BUFFERSIZE); if (buf == NULL) {