Fix two warnings from Clang's static analyzer.
This commit is contained in:
parent
29b42aa17e
commit
6168a9b6d5
2 changed files with 4 additions and 1 deletions
|
@ -633,6 +633,8 @@ bool setup_myself_reloadable(void) {
|
|||
keylifetime = 3600;
|
||||
|
||||
get_config_int(lookup_config(config_tree, "AutoConnect"), &autoconnect);
|
||||
if(autoconnect < 0)
|
||||
autoconnect = 0;
|
||||
|
||||
get_config_bool(lookup_config(config_tree, "DisableBuggyPeers"), &disablebuggypeers);
|
||||
|
||||
|
|
|
@ -213,7 +213,8 @@ static void redraw(void) {
|
|||
for(int i = 0; i < n; i++)
|
||||
sorted[i]->i = i;
|
||||
|
||||
qsort(sorted, n, sizeof *sorted, sortfunc);
|
||||
if(sorted)
|
||||
qsort(sorted, n, sizeof *sorted, sortfunc);
|
||||
|
||||
for(int i = 0, row = 3; i < n; i++, row++) {
|
||||
nodestats_t *node = sorted[i];
|
||||
|
|
Loading…
Reference in a new issue