aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDenis Cheng <crquan@gmail.com>2007-09-16 19:41:29 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:26 -0400
commit8b14a536701b50559a0d69d5d593323f550db4e9 (patch)
tree2da3f7edd8678555bc1aac5e9d0a167cb0635bf8 /net
parentc40f6fff401f693f627d3d44ef7663b993943517 (diff)
[NET]: all net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/atm/proc.c2
-rw-r--r--net/decnet/dn_dev.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/atm/proc.c b/net/atm/proc.c
index 3a6be64b0512..5d9d5ffba145 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -176,7 +176,7 @@ static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc)
176 176
177 seq_printf(seq, "%3d %3d %5d %-3s %7d %-5s %7d %-6s", 177 seq_printf(seq, "%3d %3d %5d %-3s %7d %-5s %7d %-6s",
178 vcc->dev->number,vcc->vpi,vcc->vci, 178 vcc->dev->number,vcc->vpi,vcc->vci,
179 vcc->qos.aal >= sizeof(aal_name)/sizeof(aal_name[0]) ? "err" : 179 vcc->qos.aal >= ARRAY_SIZE(aal_name) ? "err" :
180 aal_name[vcc->qos.aal],vcc->qos.rxtp.min_pcr, 180 aal_name[vcc->qos.aal],vcc->qos.rxtp.min_pcr,
181 class_name[vcc->qos.rxtp.traffic_class],vcc->qos.txtp.min_pcr, 181 class_name[vcc->qos.rxtp.traffic_class],vcc->qos.txtp.min_pcr,
182 class_name[vcc->qos.txtp.traffic_class]); 182 class_name[vcc->qos.txtp.traffic_class]);
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index ddfd2aff44d8..fa24614b5a37 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -150,7 +150,7 @@ static struct dn_dev_parms dn_dev_list[] = {
150} 150}
151}; 151};
152 152
153#define DN_DEV_LIST_SIZE (sizeof(dn_dev_list)/sizeof(struct dn_dev_parms)) 153#define DN_DEV_LIST_SIZE ARRAY_SIZE(dn_dev_list)
154 154
155#define DN_DEV_PARMS_OFFSET(x) ((int) ((char *) &((struct dn_dev_parms *)0)->x)) 155#define DN_DEV_PARMS_OFFSET(x) ((int) ((char *) &((struct dn_dev_parms *)0)->x))
156 156