wavelan: Test arraysize before an element of the array.
PATCH 1/1 wavelan: Test arraysize before an element of the array.
Test arraysize before an element of the array.
Signed-off-by Roel Kluin <[email protected]>
---
drivers/net/wireless/wavelan.c +1 -2
@@ -4281,8 +4281,7 @@ int __init init_module(void)/* Loop on all possible base addresses. */ - i =-1 ; -while ((io[++i] !=0 ) && (i <ARRAY_SIZE (io))) { +for (i =0 ; i <ARRAY_SIZE (io) && io[i] !=0 ; i++) {struct net_device *dev =alloc_etherdev (sizeof (net_local));if (!dev)break ;
Quoted 2 lines · Roel Kluin
Test arraysize before an element of the array.
=20
Hmm... I don=B4t see the point. The array can not be empty, as
it=B4s a constant, and would make the driver totally useless. But feel free to send it to push it through John Linville if you feel strongly about it...
Quoted 1 line
Signed-off-by Roel Kluin <[email protected]>
Regards,
Jean
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html