diff options
author | markm <markm@FreeBSD.org> | 2003-11-01 09:31:54 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2003-11-01 09:31:54 +0000 |
commit | a7a106c73cde44c79dad6a6c9c966bed0aeae9cc (patch) | |
tree | a520737bf1d7fe1e0d290de31c7eef33cc4ba24e /sys/dev/null | |
parent | 4034aaaff9d1329c2e9402cb1bf8c93fcd4f6b17 (diff) | |
download | FreeBSD-src-a7a106c73cde44c79dad6a6c9c966bed0aeae9cc.zip FreeBSD-src-a7a106c73cde44c79dad6a6c9c966bed0aeae9cc.tar.gz |
Shorten the code by removing one "do-nothing" function, replacing it
with nullop(), which is in kern_conf.c.
Diffstat (limited to 'sys/dev/null')
-rw-r--r-- | sys/dev/null/null.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index e5d866c..84dae30 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -46,14 +46,13 @@ static dev_t zero_dev; static d_write_t null_write; static d_ioctl_t null_ioctl; static d_read_t zero_read; -static d_read_t null_read; #define CDEV_MAJOR 2 #define NULL_MINOR 2 #define ZERO_MINOR 12 static struct cdevsw null_cdevsw = { - .d_read = null_read, + .d_read = (d_read_t *)nullop, .d_write = null_write, .d_ioctl = null_ioctl, .d_name = "null", @@ -73,14 +72,6 @@ static void *zbuf; /* ARGSUSED */ static int -null_read(dev_t dev __unused, struct uio *uio __unused, int flags __unused) -{ - - return 0; -} - -/* ARGSUSED */ -static int null_write(dev_t dev __unused, struct uio *uio, int flags __unused) { uio->uio_resid = 0; |