Commit bf3de5ed authored by Michal Janusz Miroslaw's avatar Michal Janusz Miroslaw Committed by Alexandre Julliard

DEBUG_cmp_sym: micro optimization/cleanup.

parent 221aa8d2
......@@ -104,38 +104,26 @@ static unsigned int name_hash( const char * name )
int
DEBUG_cmp_sym(const void * p1, const void * p2)
{
struct name_hash ** name1 = (struct name_hash **) p1;
struct name_hash ** name2 = (struct name_hash **) p2;
struct name_hash * name1 = *(struct name_hash **) p1;
struct name_hash * name2 = *(struct name_hash **) p2;
if( ((*name1)->flags & SYM_INVALID) != 0 )
{
if( (name1->flags & SYM_INVALID) != 0 )
return -1;
}
if( ((*name2)->flags & SYM_INVALID) != 0 )
{
if( (name2->flags & SYM_INVALID) != 0 )
return 1;
}
if( (*name1)->value.addr.seg > (*name2)->value.addr.seg )
{
if( name1->value.addr.seg > name2->value.addr.seg )
return 1;
}
if( (*name1)->value.addr.seg < (*name2)->value.addr.seg )
{
if( name1->value.addr.seg < name2->value.addr.seg )
return -1;
}
if( (*name1)->value.addr.off > (*name2)->value.addr.off )
{
if( name1->value.addr.off > name2->value.addr.off )
return 1;
}
if( (*name1)->value.addr.off < (*name2)->value.addr.off )
{
if( name1->value.addr.off < name2->value.addr.off )
return -1;
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment