mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-27 08:12:44 +00:00
Fix divbyzero and garbage variable found by clang-analyzer
This commit is contained in:
parent
197562b516
commit
4cede2ed45
@ -37,7 +37,7 @@ static ut32 consume_r (RBuffer *b, ut64 max, size_t *n_out, ConsumeFcn consume_f
|
||||
}
|
||||
|
||||
static size_t consume_u32_r (RBuffer *b, ut64 max, ut32 *out) {
|
||||
size_t n;
|
||||
size_t n = 0;
|
||||
ut32 tmp = consume_r (b, max, &n, read_u32_leb128);
|
||||
if (out) {
|
||||
*out = tmp;
|
||||
|
@ -1675,7 +1675,9 @@ static inline void printHistBlock (RPrint *p, int k, int cols) {
|
||||
kol[2] = pal->cjmp;
|
||||
kol[3] = pal->jmp;
|
||||
kol[4] = pal->call;
|
||||
|
||||
if (cols < 1) {
|
||||
cols = 1;
|
||||
}
|
||||
const bool show_colors = (p && (p->flags & R_PRINT_FLAGS_COLOR));
|
||||
if (show_colors) {
|
||||
int idx = (int) ((k * 4) / cols);
|
||||
|
Loading…
x
Reference in New Issue
Block a user