[ovs-dev] [sparse 01/18] stream-ssl: Fix call to accept().

Ethan Jackson ethan at nicira.com
Fri May 13 00:37:55 UTC 2011


Looks Good.

Ethan

On Fri, May 6, 2011 at 13:16, Ben Pfaff <blp at nicira.com> wrote:
> GCC and glibc conspire to allow struct sockaddr_in * to be passed in
> place of struct sockaddr *, but that's non-standard and we're better
> off not taking advantage of it.
>
> Found by sparse.
> ---
>  lib/stream-ssl.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c
> index 977c5ba..02ce7f5 100644
> --- a/lib/stream-ssl.c
> +++ b/lib/stream-ssl.c
> @@ -919,7 +919,7 @@ pssl_accept(struct pstream *pstream, struct stream **new_streamp)
>     int new_fd;
>     int error;
>
> -    new_fd = accept(pssl->fd, &sin, &sin_len);
> +    new_fd = accept(pssl->fd, (struct sockaddr *) &sin, &sin_len);
>     if (new_fd < 0) {
>         error = errno;
>         if (error != EAGAIN) {
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list