# HG changeset patch # User François Perrad # Date 1518838057 -3600 # Node ID 47f36d8565cfb856f184acc128accfe7d451c17c # Parent 55120acb9994290386506fabdfc8ae06a6df454a more linting (#55) * dropbear_exit: remove priority parameter confusion with dropbear_log() * const parameter diff -r 55120acb9994 -r 47f36d8565cf channel.h --- a/channel.h Fri Feb 16 19:35:32 2018 +0400 +++ b/channel.h Sat Feb 17 04:27:37 2018 +0100 @@ -94,9 +94,9 @@ struct ChanType { int sepfds; /* Whether this channel has separate pipes for in/out or not */ - char *name; + const char *name; int (*inithandler)(struct Channel*); - int (*check_close)(struct Channel*); + int (*check_close)(const struct Channel*); void (*reqhandler)(struct Channel*); void (*closehandler)(const struct Channel*); }; diff -r 55120acb9994 -r 47f36d8565cf svr-chansession.c --- a/svr-chansession.c Fri Feb 16 19:35:32 2018 +0400 +++ b/svr-chansession.c Sat Feb 17 04:27:37 2018 +0100 @@ -53,7 +53,7 @@ static void closechansess(const struct Channel *channel); static int newchansess(struct Channel *channel); static void chansessionrequest(struct Channel *channel); -static int sesscheckclose(struct Channel *channel); +static int sesscheckclose(const struct Channel *channel); static void send_exitsignalstatus(const struct Channel *channel); static void send_msg_chansess_exitstatus(const struct Channel * channel, @@ -74,7 +74,7 @@ /* required to clear environment */ extern char** environ; -static int sesscheckclose(struct Channel *channel) { +static int sesscheckclose(const struct Channel *channel) { struct ChanSess *chansess = (struct ChanSess*)channel->typedata; TRACE(("sesscheckclose, pid is %d", chansess->exit.exitpid)) return chansess->exit.exitpid != -1; diff -r 55120acb9994 -r 47f36d8565cf svr-main.c --- a/svr-main.c Fri Feb 16 19:35:32 2018 +0400 +++ b/svr-main.c Sat Feb 17 04:27:37 2018 +0100 @@ -86,7 +86,7 @@ #if DEBUG_TRACE if (debug_trace) { /* -v output goes to stderr which would get sent over the inetd network socket */ - dropbear_exit(LOG_ERR, "Dropbear inetd mode is incompatible with debug -v"); + dropbear_exit("Dropbear inetd mode is incompatible with debug -v"); } #endif