diff options
author | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-22 20:33:55 +0000 |
---|---|---|
committer | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-22 20:33:55 +0000 |
commit | b1503cda1e78cad4dca522ddbb4c69f4c6869bcd (patch) | |
tree | 26edd30543fcb27ae90f8762558ea878df42ec57 /hw/usb-net.c | |
parent | 5626b017d623cb88d973b53bca11613c766b1715 (diff) |
Use the ARRAY_SIZE() macro where appropriate.
Change from v1:
Avoid changing the existing coding style in certain files.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6120 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-net.c')
-rw-r--r-- | hw/usb-net.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/usb-net.c b/hw/usb-net.c index 82005af568..f16a0a5404 100644 --- a/hw/usb-net.c +++ b/hw/usb-net.c @@ -628,14 +628,13 @@ static int ndis_query(USBNetState *s, uint32_t oid, uint8_t *inbuf, unsigned int inlen, uint8_t *outbuf, size_t outlen) { - unsigned int i, count; + unsigned int i; switch (oid) { /* general oids (table 4-1) */ /* mandatory */ case OID_GEN_SUPPORTED_LIST: - count = sizeof(oid_supported_list) / sizeof(uint32_t); - for (i = 0; i < count; i++) + for (i = 0; i < ARRAY_SIZE(oid_supported_list); i++) ((le32 *) outbuf)[i] = cpu_to_le32(oid_supported_list[i]); return sizeof(oid_supported_list); |