summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/files.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-06-28 04:55:07 +0000
committerderaadt <deraadt@openbsd.org>2003-06-28 04:55:07 +0000
commit815b580968030c122e55571af7b6627dc3418cc8 (patch)
treebedf45a7db34f271f03255838afe84c814ec78b5 /usr.sbin/config/files.c
parentnew sysctl, ddb.log (diff)
downloadwireguard-openbsd-815b580968030c122e55571af7b6627dc3418cc8.tar.xz
wireguard-openbsd-815b580968030c122e55571af7b6627dc3418cc8.zip
ansi & prototype cleanup. tested in mkr on most arch's. ok dhartmei
Diffstat (limited to 'usr.sbin/config/files.c')
-rw-r--r--usr.sbin/config/files.c51
1 files changed, 15 insertions, 36 deletions
diff --git a/usr.sbin/config/files.c b/usr.sbin/config/files.c
index 7510e55ca6a..404f30733ea 100644
--- a/usr.sbin/config/files.c
+++ b/usr.sbin/config/files.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: files.c,v 1.12 2003/06/02 23:36:52 millert Exp $ */
+/* $OpenBSD: files.c,v 1.13 2003/06/28 04:55:07 deraadt Exp $ */
/* $NetBSD: files.c,v 1.6 1996/03/17 13:18:17 cgd Exp $ */
/*
@@ -73,7 +73,7 @@ static int expr_eval(struct nvlist *,
static void expr_free(struct nvlist *);
void
-initfiles()
+initfiles(void)
{
basetab = ht_new();
@@ -84,11 +84,7 @@ initfiles()
}
void
-addfile(path, optx, flags, rule)
- const char *path;
- struct nvlist *optx;
- int flags;
- const char *rule;
+addfile(const char *path, struct nvlist *optx, int flags, const char *rule)
{
struct files *fi;
const char *dotp, *tail;
@@ -154,10 +150,7 @@ bad:
}
void
-addobject(path, optx, flags)
- const char *path;
- struct nvlist *optx;
- int flags;
+addobject(const char *path, struct nvlist *optx, int flags)
{
struct objects *oi;
@@ -192,7 +185,7 @@ addobject(path, optx, flags)
* depending on some machine-specific device.)
*/
void
-checkfiles()
+checkfiles(void)
{
struct files *fi, *last;
@@ -209,9 +202,7 @@ checkfiles()
* We are not actually interested in the expression's value.
*/
static int
-checkaux(name, context)
- const char *name;
- void *context;
+checkaux(const char *name, void *context)
{
struct files *fi = context;
@@ -231,7 +222,7 @@ checkaux(name, context)
* from the selected sources do not collide.
*/
int
-fixfiles()
+fixfiles(void)
{
struct files *fi, *ofi;
struct nvlist *flathead, **flatp;
@@ -291,7 +282,7 @@ fixfiles()
* selection.
*/
int
-fixobjects()
+fixobjects(void)
{
struct objects *oi;
struct nvlist *flathead, **flatp;
@@ -327,9 +318,7 @@ fixobjects()
* are called to eval each atom.
*/
static int
-fixcount(name, context)
- const char *name;
- void *context;
+fixcount(const char *name, void *context)
{
struct nvlist ***p = context;
struct devbase *dev;
@@ -350,9 +339,7 @@ fixcount(name, context)
* file that will generate a .h with flags. We will need the flat list.
*/
static int
-fixfsel(name, context)
- const char *name;
- void *context;
+fixfsel(const char *name, void *context)
{
struct nvlist ***p = context;
struct nvlist *nv;
@@ -369,9 +356,7 @@ fixfsel(name, context)
* As for fixfsel above, but we do not need the flat list.
*/
static int
-fixsel(name, context)
- const char *name;
- void *context;
+fixsel(const char *name, void *context)
{
return (ht_lookup(selecttab, name) != NULL);
@@ -386,10 +371,7 @@ fixsel(name, context)
* our mixing of C's bitwise & boolean here may give surprises).
*/
static int
-expr_eval(expr, fn, context)
- struct nvlist *expr;
- int (*fn)(const char *, void *);
- void *context;
+expr_eval(struct nvlist *expr, int (*fn)(const char *, void *), void *context)
{
int lhs, rhs;
@@ -419,8 +401,7 @@ expr_eval(expr, fn, context)
* Free an expression tree.
*/
static void
-expr_free(expr)
- struct nvlist *expr;
+expr_free(struct nvlist *expr)
{
struct nvlist *rhs;
@@ -452,8 +433,7 @@ expr_free(expr)
* Print expression tree.
*/
void
-prexpr(expr)
- struct nvlist *expr;
+prexpr(struct nvlist *expr)
{
static void pr0();
@@ -464,8 +444,7 @@ prexpr(expr)
}
static void
-pr0(e)
- struct nvlist *e;
+pr0(struct nvlist *e)
{
switch (e->nv_int) {