aboutsummaryrefslogtreecommitdiff
path: root/remote
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2010-08-15 18:36:25 -0300
committerLeandro Pereira <leandro@hardinfo.org>2010-08-15 18:36:25 -0300
commit9fda18663f31e67d8c1c50e1c5a1888abceda2a6 (patch)
treea680bd9c701eaec1016d6beb28bf2c79cfc538e0 /remote
parent9fe6a457e1d9d01f6645d91805691afd429d0a2c (diff)
Fix potential problems found by clang static analyzer.
Diffstat (limited to 'remote')
-rw-r--r--remote/remote.c2
-rw-r--r--remote/ssh-conn.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/remote/remote.c b/remote/remote.c
index d266735d..f2d0f9c2 100644
--- a/remote/remote.c
+++ b/remote/remote.c
@@ -898,7 +898,7 @@ static HostDialog *host_dialog_new(GtkWidget * parent,
if (mode == HOST_DIALOG_MODE_EDIT) {
btn_save = gtk_button_new_from_stock(GTK_STOCK_SAVE);
- } else if (mode == HOST_DIALOG_MODE_CONNECT) {
+ } else {
btn_save = gtk_button_new_from_stock(GTK_STOCK_CONNECT);
}
diff --git a/remote/ssh-conn.c b/remote/ssh-conn.c
index 7f099d35..af8a6fab 100644
--- a/remote/ssh-conn.c
+++ b/remote/ssh-conn.c
@@ -149,7 +149,7 @@ SSHConnResponse ssh_new(SoupURI * uri,
char **argv, *askpass_path = NULL;
GString *cmd_line;
SSHConnResponse response;
- SSHConn *connection;
+ SSHConn *connection = NULL;
gchar buffer[512];
if (!conn_return) {
@@ -282,7 +282,7 @@ SSHConnResponse ssh_new(SoupURI * uri,
}
if (response != SSH_CONN_OK) {
- if (connection->uri) {
+ if (connection && connection->uri) {
soup_uri_free(connection->uri);
}