[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SCM] libssh shared repository - branch v0-5 updated, Oliver Stöneberg


* libssh git version control <git@xxxxxxxxxx> [110411 11:19]:
> diff --git a/src/server.c b/src/server.c
> index cb29d24..c86c2f4 100644
> --- a/src/server.c
> +++ b/src/server.c
> @@ -104,7 +104,7 @@ static int server_set_kex(ssh_session session) {
>      }
>    }
>  
> -  server->methods = malloc(10 * sizeof(char **));
> +  server->methods = (char **) malloc(10 * sizeof(char **));
>    if (server->methods == NULL) {
>      return -1;
>    }

While I personally have a strong distaste against making code harder to
read by doing unecessary casts, it may sometimes have the advantage
of making errors easier to find, like in this example. ;->

	Bernhard R. Link

Follow-Ups:
Re: [SCM] libssh shared repository - branch v0-5 updated, Oliver Stöneberg"Oliver Stöneberg" <oliverst@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org