From 75f575f3b45675d47e64a2ed8ab3bcb998d6b3a6 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 23 Dec 2007 17:09:50 +0000 Subject: use sizeof where needed --- sys/dev/bio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/dev/bio.c b/sys/dev/bio.c index ad28ba5fe10..b867fcde3b6 100644 --- a/sys/dev/bio.c +++ b/sys/dev/bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.c,v 1.10 2007/10/09 17:05:19 gilles Exp $ */ +/* $OpenBSD: bio.c,v 1.11 2007/12/23 17:09:49 deraadt Exp $ */ /* * Copyright (c) 2002 Niklas Hallqvist. All rights reserved. @@ -80,7 +80,7 @@ bioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) switch (cmd) { case BIOCLOCATE: locate = (struct bio_locate *)addr; - error = copyinstr(locate->bl_name, name, 16, NULL); + error = copyinstr(locate->bl_name, name, sizeof name, NULL); if (error != 0) return (error); locate->bl_cookie = bio_lookup(name); -- cgit v1.2.3