diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-06-03 22:04:36 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-06-03 23:17:21 +0400 |
commit | a73192497830167823d50ffb829f763ec270e7ef (patch) | |
tree | 397b0dd6ae437e40d055e130241d81e3676f2f2a /output | |
parent | 3b4e86b1ddc272cdf84f3e61486918100bb5e00f (diff) | |
download | nasm-a73192497830167823d50ffb829f763ec270e7ef.tar.gz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/output/outform.c b/output/outform.c index f5b6739f..e386343e 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", |