int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)

{

    int fd;



    switch (remote->type) {

    case SOCKET_ADDRESS_KIND_INET:

        fd = inet_dgram_saddr(remote->u.inet, local ? local->u.inet : NULL, errp);

        break;



    default:

        error_setg(errp, "socket type unsupported for datagram");

        fd = -1;

    }

    return fd;

}

int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)

{

    int fd;



    switch (remote->type) {

    case SOCKET_ADDRESS_KIND_INET:

        fd = inet_dgram_saddr(remote->u.inet, local ? local->u.inet : NULL, errp);

        break;



    default:

        error_setg(errp, "socket type unsupported for datagram");

        fd = -1;

    }

    return fd;

}

int FUNC_0(SocketAddress *VAR_0, SocketAddress *VAR_1, Error **VAR_2)

{

    int VAR_3;



    switch (VAR_0->type) {

    case SOCKET_ADDRESS_KIND_INET:

        VAR_3 = inet_dgram_saddr(VAR_0->u.inet, VAR_1 ? VAR_1->u.inet : NULL, VAR_2);

        break;



    default:

        error_setg(VAR_2, "socket type unsupported for datagram");

        VAR_3 = -1;

    }

    return VAR_3;

}

int FUNC_0(SocketAddress *VAR_0, SocketAddress *VAR_1, Error **VAR_2)
{ int VAR_3; switch (VAR_0->type) { case SOCKET_ADDRESS_KIND_INET:
VAR_3 = inet_dgram_saddr(VAR_0->u.inet, VAR_1 ? VAR_1->u.inet : NULL, VAR_2); break; default:
error_setg(VAR_2, "socket type unsupported for datagram"); VAR_3 = -1; } return VAR_3; }