summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-12-31 22:40:20 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-12-31 22:40:20 +0000
commit9edde37ba03120d81ba2fe6d7dd8b86c483dba99 (patch)
tree5e79b1813a190d27ddb339974e404b52c3f7e16c
parent7378dff946052c5068e73d54494517993d6cc567 (diff)
cleanup the ioctl function
-rw-r--r--sys/dev/rnd.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c
index 1ddb68ba781..2b73f28dc30 100644
--- a/sys/dev/rnd.c
+++ b/sys/dev/rnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd.c,v 1.117 2010/12/31 22:39:11 deraadt Exp $ */
+/* $OpenBSD: rnd.c,v 1.118 2010/12/31 22:40:19 deraadt Exp $ */
/*
* rnd.c -- A strong random number generator
@@ -944,20 +944,15 @@ randomwrite(dev_t dev, struct uio *uio, int flags)
int
randomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
- int ret = 0;
-
switch (cmd) {
case FIOASYNC:
- /* rnd has no async flag in softc so this is really a no-op. */
+ /* No async flag in softc so this is a no-op. */
break;
-
case FIONBIO:
/* Handled in the upper FS layer. */
break;
-
default:
- ret = ENOTTY;
+ return ENOTTY;
}
-
- return ret;
+ return 0;
}