Retire the -DRELEASE_CRUNCH define.

The RELEASE_CRUNCH ifdefs save about 100 bytes of text space. The
complexity is not worth it as they eliminate error messages.

Left the RELEASE_CRUNCH ifdef to eliminate a lot of stuff in place.
That saves an interesting amount of space and change some behaviors,
so absent a more detailed analysis, maintain the status quo.
This commit is contained in:
imp 2019-07-12 06:19:25 +00:00
parent 9a5b5c49bc
commit 4b73a91e13
3 changed files with 2 additions and 13 deletions

View File

@ -12,7 +12,6 @@ SRCS= acf.c arp.c async.c auth.c bundle.c cbcp.c ccp.c chap.c chat.c \
tcpmss.c throughput.c timer.c tty.c tun.c udp.c vjcomp.c
WARNS?= 3
.if defined(RELEASE_CRUNCH)
CFLAGS+=-DRELEASE_CRUNCH
PPP_NO_DES=
PPP_NO_KLDLOAD=
PPP_NO_NAT=

View File

@ -678,12 +678,9 @@ bundle_LockTun(struct bundle *bundle)
if (lockfile != NULL) {
fprintf(lockfile, "%d\n", (int)getpid());
fclose(lockfile);
}
#ifndef RELEASE_CRUNCH
else
} else
log_Printf(LogERROR, "Warning: Can't create %s: %s\n",
pidfile, strerror(errno));
#endif
}
static void

View File

@ -364,13 +364,9 @@ physical_Close(struct physical *p)
if (*p->name.full == '/') {
snprintf(fn, sizeof fn, "%s%s.if", _PATH_VARRUN, p->name.base);
#ifndef RELEASE_CRUNCH
if (ID0unlink(fn) == -1)
log_Printf(LogALERT, "%s: Can't remove %s: %s\n",
p->link.name, fn, strerror(errno));
#else
ID0unlink(fn);
#endif
}
physical_Unlock(p);
if (p->handler && p->handler->destroy)
@ -978,12 +974,9 @@ physical_Found(struct physical *p)
if (lockfile != NULL) {
fprintf(lockfile, "%s%d\n", TUN_NAME, p->dl->bundle->unit);
fclose(lockfile);
}
#ifndef RELEASE_CRUNCH
else
} else
log_Printf(LogALERT, "%s: Can't create %s: %s\n",
p->link.name, fn, strerror(errno));
#endif
}
throughput_start(&p->link.stats.total, "physical throughput",