lnc2 MAINTENANCE minor bugfixes
diff --git a/src/messages_server.c b/src/messages_server.c
index 25a6eaa..6adc987 100644
--- a/src/messages_server.c
+++ b/src/messages_server.c
@@ -846,7 +846,8 @@
elem = elem->next;
if (!elem) {
/* error */
- break;
+ ERRARG("event");
+ return NULL;
}
goto next_node;
case LYS_CONTAINER:
@@ -856,8 +857,8 @@
break;
default:
/* error */
- elem = NULL;
- break;
+ ERRARG("event");
+ return NULL;
}
}
if (!elem) {
diff --git a/src/session_client_ssh.c b/src/session_client_ssh.c
index 1a60694..5f6c623 100644
--- a/src/session_client_ssh.c
+++ b/src/session_client_ssh.c
@@ -332,8 +332,7 @@
sshauth_password(const char *username, const char *hostname, void *UNUSED(priv))
{
char *buf;
- int buflen = 1024, len, ret;
- char c = 0;
+ int c, buflen = 1024, len, ret;
struct termios oldterm;
FILE *tty;
@@ -370,7 +369,7 @@
return NULL;
}
}
- buf[len++] = c;
+ buf[len++] = (char)c;
}
buf[len++] = 0; /* terminating null byte */
@@ -394,8 +393,7 @@
sshauth_interactive(const char *auth_name, const char *instruction, const char *prompt, int echo, void *UNUSED(priv))
{
unsigned int buflen = 64, cur_len;
- char c = 0;
- int ret;
+ int ret, c;
struct termios oldterm;
char *buf;
FILE *tty;
@@ -443,7 +441,7 @@
goto fail;
}
}
- buf[cur_len++] = c;
+ buf[cur_len++] = (char)c;
}
/* terminating null byte */
buf[cur_len] = '\0';
@@ -472,8 +470,8 @@
char *
sshauth_privkey_passphrase(const char* privkey_path, void *UNUSED(priv))
{
- char c, *buf;
- int buflen = 1024, len, ret;
+ char *buf;
+ int c, buflen = 1024, len, ret;
struct termios oldterm;
FILE *tty;