summaryrefslogtreecommitdiffstats
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-05 10:00:41 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-05 10:00:41 +0000
commitf8ef75c5105e7cf6348495dd3498c990827fd3ca (patch)
tree81e2e2bfb6876e9280610fd18b1e8e092926321a /libssh
parentb7c65baef3d073e3afbee9724e5d9ca5aff0d95b (diff)
downloadlibssh-f8ef75c5105e7cf6348495dd3498c990827fd3ca.tar.gz
libssh-f8ef75c5105e7cf6348495dd3498c990827fd3ca.tar.xz
libssh-f8ef75c5105e7cf6348495dd3498c990827fd3ca.zip
Fix build warnings.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@396 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r--libssh/keyfiles.c9
-rw-r--r--libssh/keys.c5
2 files changed, 8 insertions, 6 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c
index fde20865..3ec936a1 100644
--- a/libssh/keyfiles.c
+++ b/libssh/keyfiles.c
@@ -744,8 +744,8 @@ STRING *publickey_from_next_file(SSH_SESSION *session, const char **pub_keys_pat
static char *home=NULL;
char public[256];
char private[256];
- char *priv;
- char *pub;
+ const char *priv;
+ const char *pub;
STRING *pubkey;
if(!home)
home=ssh_get_user_home_dir();
@@ -843,7 +843,8 @@ static void tokens_free(char **tokens) {
* \returns found_type type of key (ie "dsa","ssh-rsa1"). Don't free that value.
*/
-static char **ssh_get_knownhost_line(SSH_SESSION *session,FILE **file, char *filename,char **found_type){
+static char **ssh_get_knownhost_line(SSH_SESSION *session, FILE **file,
+ const char *filename, const char **found_type) {
char buffer[4096];
char *ptr;
char **tokens;
@@ -1057,7 +1058,7 @@ int ssh_is_server_known(SSH_SESSION *session){
char **tokens;
char *host;
- char *type;
+ const char *type;
int match;
FILE *file=NULL;
int ret=SSH_SERVER_NOT_KNOWN;
diff --git a/libssh/keys.c b/libssh/keys.c
index c57a45f2..b1a9cc00 100644
--- a/libssh/keys.c
+++ b/libssh/keys.c
@@ -36,7 +36,7 @@
*/
/* Public key decoding functions */
-char *ssh_type_to_char(int type){
+const char *ssh_type_to_char(int type) {
switch(type){
case TYPE_DSS:
return "ssh-dss";
@@ -111,7 +111,8 @@ PUBLIC_KEY *publickey_make_dss(SSH_SESSION *session, BUFFER *buffer){
return key;
}
-PUBLIC_KEY *publickey_make_rsa(SSH_SESSION *session, BUFFER *buffer, char *type){
+PUBLIC_KEY *publickey_make_rsa(SSH_SESSION *session, BUFFER *buffer,
+ const char *type) {
STRING *e,*n;
PUBLIC_KEY *key;