projects
/
platform
/
upstream
/
libunwind.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix some minor issues found via static analysis
[platform/upstream/libunwind.git]
/
src
/
mi
/
_ReadULEB.c
1
#include <libunwind.h>
2
3
unw_word_t
4
_ReadULEB (unsigned char **dpp)
5
{
6
unsigned shift = 0;
7
unw_word_t byte, result = 0;
8
unsigned char *bp = *dpp;
9
10
while (1)
11
{
12
byte = *bp++;
13
result |= (byte & 0x7f) << shift;
14
if ((byte & 0x80) == 0)
15
break;
16
shift += 7;
17
}
18
*dpp = bp;
19
return result;
20
}