summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-23 17:43:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-23 17:43:22 +0000
commit801de43f9d29447b81f022194690d0e2381a399e (patch)
tree54e253208fbb3a9a45f7200d3a384d5f80663253
parent6ae7762212d527dbea7541d2385cefb19c0d9a1d (diff)
KNF stuff which angelos is too much of a baby to get right
-rw-r--r--usr.sbin/config/sem.c31
-rw-r--r--usr.sbin/config/sem.h4
2 files changed, 17 insertions, 18 deletions
diff --git a/usr.sbin/config/sem.c b/usr.sbin/config/sem.c
index dbd2adc4b17..b85d05df4f1 100644
--- a/usr.sbin/config/sem.c
+++ b/usr.sbin/config/sem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sem.c,v 1.19 2001/01/23 06:02:59 angelos Exp $ */
+/* $OpenBSD: sem.c,v 1.20 2001/01/23 17:43:21 deraadt Exp $ */
/* $NetBSD: sem.c,v 1.10 1996/11/11 23:40:11 gwr Exp $ */
/*
@@ -734,14 +734,14 @@ newdevi(name, unit, d)
}
/*
- * Enable an already declared by disabled device.
+ * Enable an already declared but disabled device.
*/
void
enabledev(name, at)
- const char *name, *at;
+ const char *name, *at;
{
struct devbase *ib, *ab;
- char atbuf[NAMESIZE];
+ char atbuf[NAMESIZE];
struct attr *attr;
struct nvlist *nv;
struct devi *i;
@@ -750,38 +750,37 @@ enabledev(name, at)
i = ht_lookup(devitab, name);
if (i == NULL) {
- error("invalid device `%s'", name);
+ error("invalid device `%s'", name);
return;
}
ib = i->i_base;
if (split(at, strlen(at), atbuf, sizeof atbuf, &atunit)) {
- error("invalid attachment name `%s'", at);
+ error("invalid attachment name `%s'", at);
return;
}
cp = intern(atbuf);
ab = ht_lookup(devbasetab, cp);
if (ab == NULL) {
- error("invalid attachment device `%s'", cp);
+ error("invalid attachment device `%s'", cp);
return;
}
for (nv = ab->d_attrs; nv != NULL; nv = nv->nv_next) {
- attr = nv->nv_ptr;
- if (onlist(attr->a_devs, ib))
- goto foundattachment;
+ attr = nv->nv_ptr;
+ if (onlist(attr->a_devs, ib))
+ goto foundattachment;
}
error("%s's cannot attach to %s's", ib->d_name, atbuf);
return;
foundattachment:
- while (i && (i->i_atdev != ab))
- i = i->i_alias;
+ while (i && i->i_atdev != ab)
+ i = i->i_alias;
if (i == NULL) {
- error("%s at %s not found", name, at);
+ error("%s at %s not found", name, at);
return;
- }
- else
- i->i_disable = 0; /* Enable */
+ } else
+ i->i_disable = 0; /* Enable */
}
/*
diff --git a/usr.sbin/config/sem.h b/usr.sbin/config/sem.h
index 64949806b40..2e6ab44ee59 100644
--- a/usr.sbin/config/sem.h
+++ b/usr.sbin/config/sem.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sem.h,v 1.7 2001/01/23 06:02:59 angelos Exp $ */
+/* $OpenBSD: sem.h,v 1.8 2001/01/23 17:43:21 deraadt Exp $ */
/* $NetBSD: sem.h,v 1.6 1996/11/11 23:40:10 gwr Exp $ */
/*
@@ -61,7 +61,7 @@ void setmajor __P((struct devbase *d, int n));
void addconf __P((struct config *));
void setconf __P((struct nvlist **, const char *, struct nvlist *));
void adddev __P((const char *, const char *, struct nvlist *, int, int));
-void enabledev __P((const char *, const char *));
+void enabledev __P((const char *, const char *));
void addpseudo __P((const char *name, int number));
const char *ref __P((const char *name));
const char *starref __P((const char *name));