projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29b42aa
)
Fix two warnings from Clang's static analyzer.
author
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 15 Nov 2013 14:32:53 +0000
(15:32 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 15 Nov 2013 14:32:53 +0000
(15:32 +0100)
src/net_setup.c
patch
|
blob
|
history
src/top.c
patch
|
blob
|
history
diff --git
a/src/net_setup.c
b/src/net_setup.c
index 601a32584a7abfa1afef0b5e03a7bfbffcfd7245..421315b8fbf5eb2d77114177cab13307f5381154 100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-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);
diff --git
a/src/top.c
b/src/top.c
index b1ab40c454758bb6e9632d143aaa28297c758367..4db930439ab80c205998c2f3739ab45538b303d2 100644
(file)
--- a/
src/top.c
+++ b/
src/top.c
@@
-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];