summaryrefslogtreecommitdiffstats
path: root/usr.sbin/asf
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2003-06-08 08:37:11 +0000
committerjmallett <jmallett@FreeBSD.org>2003-06-08 08:37:11 +0000
commitdb4965625080bc74a537da74c9227680b31c1245 (patch)
tree99737f89eb3420a129f32c80381a171734452493 /usr.sbin/asf
parentd38dd4f38464853ba985a3188f1cf39a48e34dd4 (diff)
downloadFreeBSD-src-db4965625080bc74a537da74c9227680b31c1245.zip
FreeBSD-src-db4965625080bc74a537da74c9227680b31c1245.tar.gz
WARNS cleanup. Constness and shadowing, namely.
Diffstat (limited to 'usr.sbin/asf')
-rw-r--r--usr.sbin/asf/asf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/asf/asf.c b/usr.sbin/asf/asf.c
index 084f545..bec094f 100644
--- a/usr.sbin/asf/asf.c
+++ b/usr.sbin/asf/asf.c
@@ -40,10 +40,9 @@
#include <unistd.h>
#define MAXTOKEN 10
-char *token[MAXTOKEN];
-char *modules_path; /* path relative to kernel
+const char *modules_path; /* path relative to kernel
* build directory */
-char *outfile; /* and where to write the output */
+const char *outfile; /* and where to write the output */
/*
* Take a blank separated list of tokens and turn it into a list of
@@ -52,7 +51,7 @@ char *outfile; /* and where to write the output */
* number of tokens, or -1 on error (typically a missing string
* delimiter).
*/
-int
+static int
tokenize(char *cptr, char *token[], int maxtoken)
{
char delim; /* delimiter to search for */
@@ -92,8 +91,8 @@ tokenize(char *cptr, char *token[], int maxtoken)
return maxtoken; /* can't get here */
}
-void
-usage(char *myname)
+static void
+usage(const char *myname)
{
fprintf(stderr,
"Usage:\n"
@@ -115,9 +114,10 @@ main(int argc, char *argv[])
int tokens; /* number of tokens on line */
char basetoken[MAXLINE];
int i;
- char *filemode = "w"; /* mode for outfile */
+ const char *filemode = "w"; /* mode for outfile */
char cwd[MAXPATHLEN]; /* current directory */
- char *debugname = ".debug"; /* some file names end in this */
+ const char *debugname = ".debug"; /* some file names end in this */
+ char *token[MAXTOKEN];
getcwd(cwd, MAXPATHLEN); /* find where we are */
kldstat = stdin;
OpenPOWER on IntegriCloud