This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Rather than hardcode the constant, use ARRAY_SIZE to get it. Should be no functional changes here. committed -mike 2012-03-18 Mike Frysinger <vapier@gentoo.org> * dv-bfin_ebiu_amc.c (bfin_ebiu_amc_attach_address_callback): Use ARRAY_SIZE rather than hardcoded constant. --- sim/bfin/dv-bfin_ebiu_amc.c 4 Jan 2012 08:28:03 -0000 1.4 +++ sim/bfin/dv-bfin_ebiu_amc.c 19 Mar 2012 01:14:12 -0000 @@ -335,7 +335,7 @@ bfin_ebiu_amc_attach_address_callback (s HW_TRACE ((me, "attach - level=%d, space=%d, addr=0x%lx, nr_bytes=%lu, client=%s", level, space, (unsigned long) addr, (unsigned long) nr_bytes, hw_path (client))); - if (addr + nr_bytes > 4) + if (addr + nr_bytes > ARRAY_SIZE (amc->slaves)) hw_abort (me, "ebiu amc attaches are done in terms of banks"); while (nr_bytes--)
Attachment:
signature.asc
Description: This is a digitally signed message part.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |