diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2012-05-02 00:18:56 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2012-05-02 00:19:38 +0400 |
commit | 194563915dc7754a91daba2e552212416d5c519f (patch) | |
tree | 187a9b06e9495675134ed2d1b92783df671e24cc /preproc.c | |
parent | 4d02ededde9d70c9eafc7dfd0c350110de2a6dcd (diff) | |
download | nasm-194563915dc7754a91daba2e552212416d5c519f.tar.gz nasm-194563915dc7754a91daba2e552212416d5c519f.tar.bz2 nasm-194563915dc7754a91daba2e552212416d5c519f.zip |
preproc: Use bsii helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'preproc.c')
-rw-r--r-- | preproc.c | 19 |
1 files changed, 1 insertions, 18 deletions
@@ -3570,7 +3570,6 @@ issue_error: static int find_cc(Token * t) { Token *tt; - int i, j, k, m; if (!t) return -1; /* Probably a %+ without a space */ @@ -3583,23 +3582,7 @@ static int find_cc(Token * t) if (tt && (tt->type != TOK_OTHER || strcmp(tt->text, ","))) return -1; - i = -1; - j = ARRAY_SIZE(conditions); - while (j - i > 1) { - k = (j + i) / 2; - m = nasm_stricmp(t->text, conditions[k]); - if (m == 0) { - i = k; - j = -2; - break; - } else if (m < 0) { - j = k; - } else - i = k; - } - if (j != -2) - return -1; - return i; + return bsii(t->text, (const char **)conditions, ARRAY_SIZE(conditions)); } static bool paste_tokens(Token **head, const struct tokseq_match *m, |