diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-11-08 19:34:01 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-11-08 19:34:01 -0800 |
commit | 52bd38b899ed03dee25aea931c0908354b4ae6a6 (patch) | |
tree | bf11a841dc9ea01759e50a76a5fdaa784303ece4 /nasmlib.c | |
parent | 6a6eafdcee2f454eb6680b5919b9365bb2e827f0 (diff) | |
download | nasm-52bd38b899ed03dee25aea931c0908354b4ae6a6.tar.gz nasm-52bd38b899ed03dee25aea931c0908354b4ae6a6.tar.bz2 nasm-52bd38b899ed03dee25aea931c0908354b4ae6a6.zip |
nasmlib.c: prefix_name(): use the elements() macro
Use the elements() macro to count the elements in a static array.
Diffstat (limited to 'nasmlib.c')
-rw-r--r-- | nasmlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -776,7 +776,7 @@ static const char *prefix_names[] = { const char *prefix_name(int token) { unsigned int prefix = token-PREFIX_ENUM_START; - if (prefix > sizeof prefix_names / sizeof(const char *)) + if (prefix > elements(prefix_names)) return NULL; return prefix_names[prefix]; |