From 2e836bb553d72d2546de80b7f4da35355efe5baf Mon Sep 17 00:00:00 2001 From: François Perrad Date: Mon, 26 Feb 2018 14:31:15 +0100 Subject: more linting (#58) * const parameter * fix indentation --- cli-session.c | 2 +- svr-auth.c | 4 ++-- svr-runopts.c | 2 +- svr-service.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli-session.c b/cli-session.c index c28ed57..e0d3a75 100644 --- a/cli-session.c +++ b/cli-session.c @@ -181,7 +181,7 @@ static void cli_session_init(pid_t proxy_cmd_pid) { } -static void send_msg_service_request(char* servicename) { +static void send_msg_service_request(const char* servicename) { TRACE(("enter send_msg_service_request: servicename='%s'", servicename)) diff --git a/svr-auth.c b/svr-auth.c index 90334e0..59d027e 100644 --- a/svr-auth.c +++ b/svr-auth.c @@ -38,7 +38,7 @@ #include "dbrandom.h" static void authclear(void); -static int checkusername(char *username, unsigned int userlen); +static int checkusername(const char *username, unsigned int userlen); /* initialise the first time for a session, resetting all parameters */ void svr_authinitialise() { @@ -263,7 +263,7 @@ static int check_group_membership(gid_t check_gid, const char* username, gid_t u /* Check that the username exists and isn't disallowed (root), and has a valid shell. * returns DROPBEAR_SUCCESS on valid username, DROPBEAR_FAILURE on failure */ -static int checkusername(char *username, unsigned int userlen) { +static int checkusername(const char *username, unsigned int userlen) { char* listshell = NULL; char* usershell = NULL; diff --git a/svr-runopts.c b/svr-runopts.c index 1b057cf..99d63bb 100644 --- a/svr-runopts.c +++ b/svr-runopts.c @@ -542,7 +542,7 @@ void load_all_hostkeys() { #if DROPBEAR_ECDSA loadhostkey(ECDSA_PRIV_FILENAME, 0); #endif - } + } #if DROPBEAR_DELAY_HOSTKEY if (svr_opts.delay_hostkey) { diff --git a/svr-service.c b/svr-service.c index 1f72ea5..0aa487c 100644 --- a/svr-service.c +++ b/svr-service.c @@ -30,7 +30,7 @@ #include "ssh.h" #include "auth.h" -static void send_msg_service_accept(char *name, int len); +static void send_msg_service_accept(const char *name, int len); /* processes a SSH_MSG_SERVICE_REQUEST, returning 0 if finished, * 1 if not */ @@ -73,7 +73,7 @@ void recv_msg_service_request() { } -static void send_msg_service_accept(char *name, int len) { +static void send_msg_service_accept(const char *name, int len) { TRACE(("accepting service %s", name)) -- cgit v1.2.3