winedbg: Trivial code cleanup (cmp_sym)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog:
  - DEBUG_cmp_sym: micro optimization/cleanup

Index: programs/winedbg/hash.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/hash.c,v
retrieving revision 1.7
diff -u -r1.7 hash.c
--- programs/winedbg/hash.c	19 Feb 2003 03:41:48 -0000	1.7
+++ programs/winedbg/hash.c	18 Apr 2003 01:18:03 -0000
@@ -104,38 +104,26 @@
 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;
 }


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux