summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran?ois Perrad <francois.perrad@gadz.org>2018-02-17 04:27:37 +0100
committerFran?ois Perrad <francois.perrad@gadz.org>2018-02-17 04:27:37 +0100
commit2b551518f8625f87a22ea1fde40e3c7d841bf9d0 (patch)
tree1ba895d4877e0e5305f56aaa8e9c132d344519b1
parent8c2b5076adf899e39161deaa1be258fb588b124d (diff)
downloaddropbear-2b551518f8625f87a22ea1fde40e3c7d841bf9d0.tar.gz
more linting (#55)
* dropbear_exit: remove priority parameter confusion with dropbear_log() * const parameter
-rw-r--r--channel.h4
-rw-r--r--svr-chansession.c4
-rw-r--r--svr-main.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/channel.h b/channel.h
index 8736fbe..c6c4fda 100644
--- a/channel.h
+++ b/channel.h
@@ -94,9 +94,9 @@ struct Channel {
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 --git a/svr-chansession.c b/svr-chansession.c
index cdc6e94..faf62e5 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -53,7 +53,7 @@ static void sesssigchild_handler(int val);
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 @@ const struct ChanType svrchansess = {
/* 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 --git a/svr-main.c b/svr-main.c
index a7e447e..6f3144b 100644
--- a/svr-main.c
+++ b/svr-main.c
@@ -86,7 +86,7 @@ static void main_inetd() {
#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