Author: petdance
Date: Fri Feb 29 21:16:00 2008
New Revision: 26142
Modified:
trunk/compilers/imcc/symreg.c
Log:
fix a sign mismatch. Move a cheap comparison before an expensive one.
Modified: trunk/compilers/imcc/symreg.c
==============================================================================
--- trunk/compilers/imcc/symreg.c (original)
+++ trunk/compilers/imcc/symreg.c Fri Feb 29 21:16:00 2008
@@ -161,11 +161,11 @@
static SymReg *
_get_sym_typed(ARGIN(const SymHash *hsh), ARGIN(const char *name), int t)
{
- const int i = hash_str(name) % hsh->size;
+ const unsigned int i = hash_str(name) % hsh->size;
SymReg *p;
for (p = hsh->data[i]; p; p = p->next) {
- if (STREQ(name, p->name) && (t == p->set))
+ if ((t == p->set) && STREQ(name, p->name))
return p;
}