Eric Pouech : dbghelp: dwarf: Tidy up leb128 reading.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jun 20 05:23:46 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 797acdf436ae098244c3415c795b128a366ce204
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=797acdf436ae098244c3415c795b128a366ce204

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Sun Jun 18 21:32:33 2006 +0200

dbghelp: dwarf: Tidy up leb128 reading.

---

 dlls/dbghelp/dwarf.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index be23e3e..18bf253 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -207,13 +207,13 @@ static unsigned long dwarf2_leb128_as_un
 
     assert( NULL != ctx );
 
-    while (1)
+    do
     {
         byte = dwarf2_parse_byte(ctx);
         ret |= (byte & 0x7f) << shift;
         shift += 7;
-        if (0 == (byte & 0x80)) { break ; }
-    }
+    } while (byte & 0x80);
+
     return ret;
 }
 
@@ -226,13 +226,13 @@ static long dwarf2_leb128_as_signed(dwar
 
     assert( NULL != ctx );
 
-    while (1)
+    do
     {
         byte = dwarf2_parse_byte(ctx);
         ret |= (byte & 0x7f) << shift;
         shift += 7;
-        if (0 == (byte & 0x80)) { break ; }
-    }
+    } while (byte & 0x80);
+
     /* as spec: sign bit of byte is 2nd high order bit (80x40)
      *  -> 0x80 is used as flag.
      */




More information about the wine-cvs mailing list