[PATCH 31/31] [DbgHelp]: dwarf & leb128
Eric Pouech
eric.pouech at wanadoo.fr
Sun Jun 18 14:32:33 CDT 2006
- tidy up leb128 reading
A+
---
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 4d98b15..0910a89 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -208,13 +208,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;
}
@@ -227,13 +227,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-patches
mailing list