Fix latest covs

This commit is contained in:
pancake 2016-12-22 16:13:25 +01:00
parent d026853e73
commit d7240fac8e
3 changed files with 17 additions and 11 deletions

View File

@ -34,3 +34,4 @@ You are in a trouble. Don't look away
You are a strange creature
If they were going to kill you, would they knock?
This is what I hate most about guys like you. You didn't even try.
Touch your monitor. It is warm like flesh. But it is not flesh. Yet.

View File

@ -229,7 +229,7 @@ static void readlabel(const char **p, int store) {
*p = c;
return;
}
if (NULL == (buf = malloc (sizeof (struct label) + c - *p))) {
if (! (buf = malloc (sizeof (struct label) + c - *p))) {
eprintf ("not enough memory to store label %s\n", *p);
*p = c;
return;

View File

@ -1695,9 +1695,7 @@ static void get_bbupdate(RAGraph *g, RCore *core, RAnalFunction *fcn) {
saved_arena = r_reg_arena_peek (core->anal->reg);
}
if (!fcn) {
if (saved_arena) {
R_FREE (saved_arena);
}
R_FREE (saved_arena);
return;
}
r_list_sort (fcn->bbs, (RListComparator)bbcmp);
@ -2777,6 +2775,9 @@ R_API int r_core_visual_graph(RCore *core, RAGraph *g, RAnalFunction *_fcn, int
int movspeed;
int ret, invscroll;
RConfigHold *hc = r_config_hold_new (core->config);
if (!hc) {
return false;
}
int h, w = r_cons_get_size (&h);
can = r_cons_canvas_new (w, h);
@ -2784,14 +2785,13 @@ R_API int r_core_visual_graph(RCore *core, RAGraph *g, RAnalFunction *_fcn, int
eprintf (
"Cannot create RCons.canvas context. Invalid screen "
"size? See scr.columns + scr.rows\n");
r_config_restore (hc);
r_config_hold_free (hc);
return false;
}
can->linemode = 1;
can->color = r_config_get_i (core->config, "scr.color");
if (!hc) {
return false;
}
r_config_save_num (hc, "asm.cmtright", NULL);
if (!g) {
graph_allocated = true;
@ -2907,20 +2907,25 @@ R_API int r_core_visual_graph(RCore *core, RAGraph *g, RAnalFunction *_fcn, int
r_core_cmd0 (core, "ag-;.dtg*;aggi");
break;
case 'V':
if (fcn) agraph_toggle_callgraph (g);
if (fcn) {
agraph_toggle_callgraph (g);
}
break;
case 'Z':
if (okey == 27) agraph_prev_node (g);
if (okey == 27) {
agraph_prev_node (g);
}
break;
case 's':
key_s = r_config_get (core->config, "key.s");
if (key_s && *key_s) {
r_core_cmd0 (core, key_s);
} else {
if (r_config_get_i (core->config, "cfg.debug"))
if (r_config_get_i (core->config, "cfg.debug")) {
r_core_cmd0 (core, "ds;.dr*");
else
} else {
r_core_cmd0 (core, "aes;.dr*");
}
}
g->is_instep = true;
g->need_reload_nodes = true;