From cfb9be506285cd65120f9686d532130a3757ce56 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 29 Sep 2021 22:01:34 -0500 Subject: bootp: remove the USE_BFUNCS knob We'd likely be better served by converting these to the equivalent mem* calls, but just kill the knob for now. The b* macros being defined get in the way of _FORTIFY_SOURCE. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D32235 --- libexec/bootpd/bootpd.c | 8 -------- libexec/bootpd/bootpgw/bootpgw.c | 8 -------- libexec/bootpd/dovend.c | 9 --------- libexec/bootpd/dumptab.c | 9 +-------- libexec/bootpd/hash.c | 9 +-------- libexec/bootpd/hwaddr.c | 8 -------- libexec/bootpd/lookup.c | 7 +------ libexec/bootpd/readfile.c | 8 -------- libexec/bootpd/tools/bootpef/bootpef.c | 8 -------- libexec/bootpd/tools/bootptest/bootptest.h | 8 -------- 10 files changed, 3 insertions(+), 79 deletions(-) (limited to 'libexec/bootpd') diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index 86e4f56ab61a..42f1cd8c5912 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -73,14 +73,6 @@ __FBSDID("$FreeBSD$"); # include /* for O_RDONLY, etc */ #endif -#ifndef USE_BFUNCS -# include -/* Yes, memcpy is OK here (no overlapped copies). */ -# define bcopy(a,b,c) memcpy(b,a,c) -# define bzero(p,l) memset(p,0,l) -# define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "hash.h" #include "hwaddr.h" diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c index 2e2df9e71a2a..3c128c03a9a6 100644 --- a/libexec/bootpd/bootpgw/bootpgw.c +++ b/libexec/bootpd/bootpgw/bootpgw.c @@ -66,14 +66,6 @@ __FBSDID("$FreeBSD$"); # include /* for O_RDONLY, etc */ #endif -#ifndef USE_BFUNCS -# include -/* Yes, memcpy is OK here (no overlapped copies). */ -# define bcopy(a,b,c) memcpy(b,a,c) -# define bzero(p,l) memset(p,0,l) -# define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "getif.h" #include "hwaddr.h" diff --git a/libexec/bootpd/dovend.c b/libexec/bootpd/dovend.c index cb0b4a0448c4..65543a2700c0 100644 --- a/libexec/bootpd/dovend.c +++ b/libexec/bootpd/dovend.c @@ -15,15 +15,6 @@ #include #include -#ifndef USE_BFUNCS -# include -/* Yes, memcpy is OK here (no overlapped copies). */ -# define bcopy(a,b,c) memcpy(b,a,c) -# define bzero(p,l) memset(p,0,l) -# define bcmp(a,b,c) memcmp(a,b,c) -# define index strchr -#endif - #include "bootp.h" #include "bootpd.h" #include "report.h" diff --git a/libexec/bootpd/dumptab.c b/libexec/bootpd/dumptab.c index 43e94ec4cef2..daab93f609a6 100644 --- a/libexec/bootpd/dumptab.c +++ b/libexec/bootpd/dumptab.c @@ -10,17 +10,10 @@ #include #include +#include #include #include -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "hash.h" #include "hwaddr.h" diff --git a/libexec/bootpd/hash.c b/libexec/bootpd/hash.c index 64f49d3b957d..1641a8a092cd 100644 --- a/libexec/bootpd/hash.c +++ b/libexec/bootpd/hash.c @@ -37,14 +37,7 @@ SOFTWARE. #include #include - -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif +#include #include "hash.h" diff --git a/libexec/bootpd/hwaddr.c b/libexec/bootpd/hwaddr.c index ff996157b911..293c75a6b3be 100644 --- a/libexec/bootpd/hwaddr.c +++ b/libexec/bootpd/hwaddr.c @@ -38,14 +38,6 @@ #endif #include -#ifndef USE_BFUNCS -/* Yes, memcpy is OK here (no overlapped copies). */ -#include -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - #ifndef ATF_INUSE /* Not defined on some systems (i.e. Linux) */ #define ATF_INUSE 0 #endif diff --git a/libexec/bootpd/lookup.c b/libexec/bootpd/lookup.c index 54b3f62242f7..391a1d826d6e 100644 --- a/libexec/bootpd/lookup.c +++ b/libexec/bootpd/lookup.c @@ -17,14 +17,9 @@ extern int ether_hostton(); #endif #include +#include #include -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#endif - #include "bootp.h" #include "lookup.h" #include "report.h" diff --git a/libexec/bootpd/readfile.c b/libexec/bootpd/readfile.c index 900d0377279f..c09639300310 100644 --- a/libexec/bootpd/readfile.c +++ b/libexec/bootpd/readfile.c @@ -46,14 +46,6 @@ SOFTWARE. #include #include -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "hash.h" #include "hwaddr.h" diff --git a/libexec/bootpd/tools/bootpef/bootpef.c b/libexec/bootpd/tools/bootpef/bootpef.c index 04089c87b560..7ed3786d892e 100644 --- a/libexec/bootpd/tools/bootpef/bootpef.c +++ b/libexec/bootpd/tools/bootpef/bootpef.c @@ -55,14 +55,6 @@ SOFTWARE. #include #include -#ifndef USE_BFUNCS -#include -/* Yes, memcpy is OK here (no overlapped copies). */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - #include "bootp.h" #include "hash.h" #include "hwaddr.h" diff --git a/libexec/bootpd/tools/bootptest/bootptest.h b/libexec/bootpd/tools/bootptest/bootptest.h index 2df35dea7ffc..2d9e451bddef 100644 --- a/libexec/bootpd/tools/bootptest/bootptest.h +++ b/libexec/bootpd/tools/bootptest/bootptest.h @@ -6,14 +6,6 @@ #define ESRC(p) (p) #define EDST(p) (p) -#ifndef USE_BFUNCS -/* Use mem/str functions */ -/* There are no overlapped copies, so memcpy is OK. */ -#define bcopy(a,b,c) memcpy(b,a,c) -#define bzero(p,l) memset(p,0,l) -#define bcmp(a,b,c) memcmp(a,b,c) -#endif - extern int vflag; /* verbose flag */ /* global pointers to beginning and end of current packet (during printing) */ -- cgit v1.2.3