diff --git a/include/libssh/priv.h b/include/libssh/priv.h index e4b5e6cb..7cc2cb26 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -510,7 +510,7 @@ int ssh_send_banner(SSH_SESSION *session, int is_server); char *ssh_get_banner(SSH_SESSION *session); /* errors.c */ -void ssh_set_error(void *error,int code,char *descr,...); +void ssh_set_error(void *error, int code, const char *descr, ...); /* in dh.c */ /* DH key generation */ diff --git a/libssh/error.c b/libssh/error.c index 36fed437..b44ab402 100644 --- a/libssh/error.c +++ b/libssh/error.c @@ -36,7 +36,7 @@ */ /* ssh_set_error registers an error with a description. the error code is the class of error, and description is obvious.*/ -void ssh_set_error(void *error,int code,char *descr,...){ +void ssh_set_error(void *error, int code, const char *descr, ...) { struct error_struct *err= error; va_list va; va_start(va,descr);