From b964d7907c776d74c638ad3862461094189d7db7 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Sun, 4 Apr 2010 16:14:53 +0000 Subject: wcte12xp: Use ARRAY_SIZE in a couple more places git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8466 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wcte12xp/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 77d72c5..1ff0954 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -1362,14 +1362,14 @@ static int t1_software_init(struct t1 *wc) struct pci_dev *pdev = wc->vb.pdev; /* Find position */ - for (x = 0; x < sizeof(ifaces) / sizeof(ifaces[0]); x++) { + for (x = 0; x < ARRAY_SIZE(ifaces); ++x) { if (ifaces[x] == wc) { debug_printk(wc, 1, "software init for card %d\n", x); break; } } - if (x == sizeof(ifaces) / sizeof(ifaces[0])) + if (x == ARRAY_SIZE(ifaces)) return -1; t4_serial_setup(wc); -- cgit v1.2.3