From 28c8ec2f7edccd280e5acce98d26f273cfa2a7f5 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 12 Jul 2019 06:19:25 +0000 Subject: [PATCH] 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. --- usr.sbin/ppp/Makefile | 1 - usr.sbin/ppp/bundle.c | 5 +---- usr.sbin/ppp/physical.c | 9 +-------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile index 29e6f294056..017250f5a37 100644 --- a/usr.sbin/ppp/Makefile +++ b/usr.sbin/ppp/Makefile @@ -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= diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index a35b752d725..1af2924b8d5 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -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 diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index eb74b33a155..5612c1194e9 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -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",