From 2f1d65aabc57886fe70ab681fb66513a4db95b8f Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Mon, 14 Nov 1994 07:51:11 +0000 Subject: [PATCH] Don't build an unused array of kernel names when HAVE_GETBOOTFILE is defined. Don't use the newfangled C features to waste time building the array at runtime when HAVE_GETBOOTFILE is not defined. --- usr.sbin/xntpd/util/tickadj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/xntpd/util/tickadj.c b/usr.sbin/xntpd/util/tickadj.c index 41d4c4634041..75d2ab7cabfb 100644 --- a/usr.sbin/xntpd/util/tickadj.c +++ b/usr.sbin/xntpd/util/tickadj.c @@ -430,7 +430,8 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off) {""}, }; #endif - char *kernels[] = { +#ifndef HAVE_GETBOOTFILE + static char *kernels[] = { "/kernel", "/vmunix", "/unix", @@ -440,6 +441,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off) "/netbsd", NULL }; +#endif struct stat stbuf; #ifdef HAVE_GETBOOTFILE