changeset 1508:47f36d8565cf

more linting (#55) * dropbear_exit: remove priority parameter confusion with dropbear_log() * const parameter
author François Perrad <francois.perrad@gadz.org>
date Sat, 17 Feb 2018 04:27:37 +0100
parents 55120acb9994
children eb4c7052f51d 5916af64acd4 c7675aa88880
files channel.h svr-chansession.c svr-main.c
diffstat 3 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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*);
 };
--- 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;
--- 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