ovs-vsctl: Clarify that uuid_from_string() shouldn't fail in post_create().
authorBen Pfaff <blp@nicira.com>
Wed, 23 Feb 2011 21:05:25 +0000 (13:05 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 23 Feb 2011 23:14:42 +0000 (15:14 -0800)
Coverity #10701.

utilities/ovs-vsctl.c

index 3a14f71369ece8cae487a897264a81f321cd3829..4435f41d197e5c7562cc9ede0b423fc18527918a 100644 (file)
@@ -3127,7 +3127,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);