diff svr-chansession.c @ 1460:58a74cb829b8

Pointer parameter could be declared as pointing to const (callback)
author Francois Perrad <francois.perrad@gadz.org>
date Sat, 19 Aug 2017 22:39:53 +0200
parents 06d52bcb8094
children 0c16b4ccbd54
line wrap: on
line diff
--- a/svr-chansession.c	Sat Aug 19 17:16:13 2017 +0200
+++ b/svr-chansession.c	Sat Aug 19 22:39:53 2017 +0200
@@ -47,10 +47,10 @@
 static int noptycommand(struct Channel *channel, struct ChanSess *chansess);
 static int ptycommand(struct Channel *channel, struct ChanSess *chansess);
 static int sessionwinchange(const struct ChanSess *chansess);
-static void execchild(void *user_data_chansess);
+static void execchild(const void *user_data_chansess);
 static void addchildpid(struct ChanSess *chansess, pid_t pid);
 static void sesssigchild_handler(int val);
-static void closechansess(struct Channel *channel);
+static void closechansess(const struct Channel *channel);
 static int newchansess(struct Channel *channel);
 static void chansessionrequest(struct Channel *channel);
 static int sesscheckclose(const struct Channel *channel);
@@ -281,7 +281,7 @@
 }
 
 /* clean a session channel */
-static void closechansess(struct Channel *channel) {
+static void closechansess(const struct Channel *channel) {
 
 	struct ChanSess *chansess;
 	unsigned int i;
@@ -898,7 +898,7 @@
 
 /* Clean up, drop to user privileges, set up the environment and execute
  * the command/shell. This function does not return. */
-static void execchild(void *user_data) {
+static void execchild(const void *user_data) {
 	struct ChanSess *chansess = user_data;
 	char *usershell = NULL;