From f67aa7224b80cdcc71d1144ca25784f2b2adf384 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Thu, 8 Jul 2010 07:19:55 +0000 Subject: - use nitems() where applicable ok grange@ --- sys/dev/onewire/owctr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/dev/onewire/owctr.c') diff --git a/sys/dev/onewire/owctr.c b/sys/dev/onewire/owctr.c index 3d57cffa022..5f0beb963c7 100644 --- a/sys/dev/onewire/owctr.c +++ b/sys/dev/onewire/owctr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: owctr.c,v 1.2 2010/07/07 16:15:53 deraadt Exp $ */ +/* $OpenBSD: owctr.c,v 1.3 2010/07/08 07:19:54 jasper Exp $ */ /* * Copyright (c) 2010 John L. Scarfone * @@ -84,8 +84,7 @@ static const struct onewire_matchfam owctr_fams[] = { int owctr_match(struct device *parent, void *match, void *aux) { - return (onewire_matchbyfam(aux, owctr_fams, - sizeof(owctr_fams) /sizeof(owctr_fams[0]))); + return (onewire_matchbyfam(aux, owctr_fams, nitems(owctr_fams))); } void -- cgit v1.2.3