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:
parent
9a5b5c49bc
commit
4b73a91e13
@ -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=
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user