applied

On Wed, 4 May 2022, Martin Vahlensieck wrote:

> Hi
> 
> channel_new no longer frees remote_name.  So update the comment
> accordingly.  As remote_name is not modified, it can be const
> as well.
> 
> Best,
> 
> Martin
> 
> Index: channels.c
> ===================================================================
> RCS file: /home/reposync/cvs/src/usr.bin/ssh/channels.c,v
> retrieving revision 1.418
> diff -u -p -r1.418 channels.c
> --- channels.c        4 May 2022 07:31:22 -0000       1.418
> +++ channels.c        4 May 2022 19:02:14 -0000
> @@ -349,12 +349,11 @@ channel_register_fds(struct ssh *ssh, Ch
>  }
>  
>  /*
> - * Allocate a new channel object and set its type and socket. This will cause
> - * remote_name to be freed.
> + * Allocate a new channel object and set its type and socket.
>   */
>  Channel *
>  channel_new(struct ssh *ssh, char *ctype, int type, int rfd, int wfd, int 
> efd,
> -    u_int window, u_int maxpack, int extusage, char *remote_name, int 
> nonblock)
> +    u_int window, u_int maxpack, int extusage, const char *remote_name, int 
> nonblock)
>  {
>       struct ssh_channels *sc = ssh->chanctxt;
>       u_int i, found;
> Index: channels.h
> ===================================================================
> RCS file: /home/reposync/cvs/src/usr.bin/ssh/channels.h,v
> retrieving revision 1.142
> diff -u -p -r1.142 channels.h
> --- channels.h        30 Mar 2022 21:10:25 -0000      1.142
> +++ channels.h        6 Apr 2022 20:26:56 -0000
> @@ -272,7 +272,7 @@ Channel   *channel_by_id(struct ssh *, int
>  Channel      *channel_by_remote_id(struct ssh *, u_int);
>  Channel      *channel_lookup(struct ssh *, int);
>  Channel *channel_new(struct ssh *, char *, int, int, int, int,
> -         u_int, u_int, int, char *, int);
> +         u_int, u_int, int, const char *, int);
>  void  channel_set_fds(struct ssh *, int, int, int, int, int,
>           int, int, u_int);
>  void  channel_free(struct ssh *, Channel *);
> 
> 

Reply via email to