diff options
| author | Andreas Schneider <mail@cynapses.org> | 2009-04-05 11:26:34 +0000 |
|---|---|---|
| committer | Andreas Schneider <mail@cynapses.org> | 2009-04-05 11:26:34 +0000 |
| commit | 6c6094538fead5d21c7e489cbc7f0b917458cbdd (patch) | |
| tree | 19085bfa07a87ce25eaa3541e21e2706b48a41fc /libssh | |
| parent | db4ff30f387275b49378350f109893d0dc2be0b8 (diff) | |
| download | libssh-6c6094538fead5d21c7e489cbc7f0b917458cbdd.tar.gz libssh-6c6094538fead5d21c7e489cbc7f0b917458cbdd.tar.xz libssh-6c6094538fead5d21c7e489cbc7f0b917458cbdd.zip | |
Use const where it should be used.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@407 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
| -rw-r--r-- | libssh/dh.c | 2 | ||||
| -rw-r--r-- | libssh/keyfiles.c | 3 | ||||
| -rw-r--r-- | libssh/keys.c | 2 | ||||
| -rw-r--r-- | libssh/misc.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/libssh/dh.c b/libssh/dh.c index 0ef3c90e..24e7257e 100644 --- a/libssh/dh.c +++ b/libssh/dh.c @@ -128,7 +128,7 @@ void ssh_crypto_finalize(void){ } /* prints the bignum on stderr */ -void ssh_print_bignum(char *which,bignum num){ +void ssh_print_bignum(const char *which,bignum num){ #ifdef HAVE_LIBGCRYPT unsigned char *hex; bignum_bn2hex(num,&hex); diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c index 73a8704a..22ead297 100644 --- a/libssh/keyfiles.c +++ b/libssh/keyfiles.c @@ -596,7 +596,8 @@ PRIVATE_KEY *privatekey_from_file(SSH_SESSION *session, const char *filename, } /* same that privatekey_from_file() but without any passphrase things. */ -PRIVATE_KEY *_privatekey_from_file(void *session,char *filename,int type){ +PRIVATE_KEY *_privatekey_from_file(void *session, const char *filename, + int type) { FILE *file=fopen(filename,"r"); PRIVATE_KEY *privkey; #ifdef HAVE_LIBGCRYPT diff --git a/libssh/keys.c b/libssh/keys.c index b1a9cc00..f7cf8e77 100644 --- a/libssh/keys.c +++ b/libssh/keys.c @@ -48,7 +48,7 @@ const char *ssh_type_to_char(int type) { } } -int ssh_type_from_name(char *name) { +int ssh_type_from_name(const char *name) { if (strcmp(name, "rsa1") == 0) { return TYPE_RSA1; } else if (strcmp(name, "rsa") == 0) { diff --git a/libssh/misc.c b/libssh/misc.c index c619530a..3f404fd2 100644 --- a/libssh/misc.c +++ b/libssh/misc.c @@ -95,7 +95,7 @@ char *ssh_get_user_home_dir(void) { #endif /* we have read access on file */ -int ssh_file_readaccess_ok(char *file){ +int ssh_file_readaccess_ok(const char *file){ if(!access(file,R_OK)) return 1; return 0; |
