summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/main.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-02-19 04:43:21 +0000
committerpeter <peter@FreeBSD.org>2001-02-19 04:43:21 +0000
commitb96d955fcac9315b51bd01025be303eabf0cdfc6 (patch)
treec40bcee409cdb724826174fb503e72be95d9626e /usr.sbin/config/main.c
parent49ef1aaa13c43ce23bf5d856364d1178c713f50c (diff)
downloadFreeBSD-src-b96d955fcac9315b51bd01025be303eabf0cdfc6.zip
FreeBSD-src-b96d955fcac9315b51bd01025be303eabf0cdfc6.tar.gz
${BDECFLAGS} work. And fix a real error in the process. A "MAXUSERS"
string could have been passed to free(); There are some warnings here I am not sure how to fix as they are in the lex scanner code, etc.
Diffstat (limited to 'usr.sbin/config/main.c')
-rw-r--r--usr.sbin/config/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index acc5647..4f8e77b 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -306,7 +306,7 @@ begin:
* prepend the path to a filename
*/
char *
-path(char *file)
+path(const char *file)
{
char *cp = NULL;
@@ -452,16 +452,15 @@ cleanheaders(char *p)
}
void
-remember(char *file)
+remember(const char *file)
{
char *s;
struct hdr_list *hl;
if ((s = strrchr(file, '/')) != NULL)
- s++;
+ s = ns(s + 1);
else
- s = file;
- s = ns(s);
+ s = ns(file);
if (index(s, '_') && strncmp(s, "opt_", 4) != 0) {
free(s);
OpenPOWER on IntegriCloud