summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-06-03 22:04:36 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-06-03 23:17:21 +0400
commita73192497830167823d50ffb829f763ec270e7ef (patch)
tree397b0dd6ae437e40d055e130241d81e3676f2f2a /output
parent3b4e86b1ddc272cdf84f3e61486918100bb5e00f (diff)
downloadnasm-a73192497830167823d50ffb829f763ec270e7ef.tar.gz
nasm-a73192497830167823d50ffb829f763ec270e7ef.tar.bz2
nasm-a73192497830167823d50ffb829f763ec270e7ef.zip
nasmlib: Rename elements() macro to ARRAY_SIZE
ARRAY_SIZE is a well known name pointing out that we're dealing with array in macro argument. Also to be on a safe side prefix_name helper should check the index been in bounds more precisely. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'output')
-rw-r--r--output/outform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/output/outform.c b/output/outform.c
index f5b6739..e386343 100644
--- a/output/outform.c
+++ b/output/outform.c
@@ -59,7 +59,7 @@ struct ofmt *ofmt_find(char *name)
}
/* lets walk thru aliases then */
- for (i = 0; i < elements(ofmt_aliases); i++) {
+ for (i = 0; i < ARRAY_SIZE(ofmt_aliases); i++) {
if (ofmt_aliases[i].shortname &&
!nasm_stricmp(name, ofmt_aliases[i].shortname))
return ofmt_aliases[i].ofmt;
@@ -92,7 +92,7 @@ void ofmt_list(struct ofmt *deffmt, FILE * fp)
}
/* lets walk through aliases then */
- for (i = 0; i < elements(ofmt_aliases); i++) {
+ for (i = 0; i < ARRAY_SIZE(ofmt_aliases); i++) {
if (!ofmt_aliases[i].shortname)
continue;
fprintf(fp, " %-10s%s\n",