[ovs-dev] [coverity3 10/13] ovs-vsctl: Clarify that uuid_from_string() shouldn't fail in post_create().

Ethan Jackson ethan at nicira.com
Wed Feb 23 22:53:31 UTC 2011


Looks Good.

On Wed, Feb 23, 2011 at 1:24 PM, Ben Pfaff <blp at nicira.com> wrote:
> Coverity #10701.
> ---
>  utilities/ovs-vsctl.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c
> index 6db4362..b9981aa 100644
> --- a/utilities/ovs-vsctl.c
> +++ b/utilities/ovs-vsctl.c
> @@ -3126,7 +3126,9 @@ post_create(struct vsctl_context *ctx)
>     const struct uuid *real;
>     struct uuid dummy;
>
> -    uuid_from_string(&dummy, ds_cstr(&ctx->output));
> +    if (!uuid_from_string(&dummy, ds_cstr(&ctx->output))) {
> +        NOT_REACHED();
> +    }
>     real = ovsdb_idl_txn_get_insert_uuid(ctx->txn, &dummy);
>     if (real) {
>         ds_clear(&ctx->output);
> --
> 1.7.2.3
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>




More information about the dev mailing list