From 4e0a104f9171fa5286b62f12a0b3932d29bc29fc Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sat, 1 Nov 2003 09:31:54 +0000 Subject: Shorten the code by removing one "do-nothing" function, replacing it with nullop(), which is in kern_conf.c. --- sys/dev/null/null.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'sys/dev/null') diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index e5d866c1e22f6..84dae3010ddf3 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", @@ -71,14 +70,6 @@ static struct cdevsw zero_cdevsw = { 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) -- cgit v1.3