diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index a1b5b1b9..bec73771 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -10,6 +10,9 @@ src/tap/usbconn/libftdi.c, src/tap/usbconn/libusb.c, sysdep.h: Unify system checks in the common sysdep.h header. + * src/cmd/cmd_bfin.c, src/flash/detectflash.c, sysdep.h: Unify ARRAY_SIZE + helper macro here. + 2010-01-28 Mike Frysinger * src/cmd/cmd_bfin.c: Replace one-insn-a-file option with dynamic instruction diff --git a/urjtag/src/cmd/cmd_bfin.c b/urjtag/src/cmd/cmd_bfin.c index 26331674..ede3ca09 100644 --- a/urjtag/src/cmd/cmd_bfin.c +++ b/urjtag/src/cmd/cmd_bfin.c @@ -34,8 +34,6 @@ #include "cmd.h" -#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) - static int cmd_bfin_run (urj_chain_t *chain, char *params[]) { diff --git a/urjtag/src/flash/detectflash.c b/urjtag/src/flash/detectflash.c index cd1967f5..771d4199 100644 --- a/urjtag/src/flash/detectflash.c +++ b/urjtag/src/flash/detectflash.c @@ -297,8 +297,6 @@ urj_flash_detectflash (urj_log_level_t ll, urj_bus_t *bus, uint32_t adr) }; const char *bad_value = N_("Bad value"); -#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) - pri_vendor_tbl = cfi->identification_string.pri_vendor_tbl; major_version = pri_vendor_tbl->major_version; minor_version = pri_vendor_tbl->minor_version; diff --git a/urjtag/sysdep.h b/urjtag/sysdep.h index 6ed604d7..d74bf596 100644 --- a/urjtag/sysdep.h +++ b/urjtag/sysdep.h @@ -72,4 +72,6 @@ struct timespec { unsigned long tv_sec, tv_nsec; }; #define nanosleep(req, rem) usleep((req)->tv_sec * 1000 * 1000 + (req)->tv_nsec / 1000) #endif +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) + #endif /* SYSDEP_H */