From b89d8339252cd330daca7341bbd76c7316080127 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 10 Feb 2010 11:21:56 -0800 Subject: [PATCH] ovs-vsctl: Avoid redundant initializations in "add-br" command. Found by Clang (http://clang-analyzer.llvm.org). --- utilities/ovs-vsctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 9baca428..498a0b0b 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -832,10 +832,9 @@ static void cmd_add_br(struct vsctl_context *ctx) { bool may_exist = shash_find(&ctx->options, "--may-exist") != 0; - const char *br_name = ctx->argv[1]; - const char *parent_name = ctx->argc > 2 ? ctx->argv[2] : NULL; - int vlan = ctx->argc > 3 ? atoi(ctx->argv[3]) : 0; + const char *br_name, *parent_name; struct vsctl_info info; + int vlan; br_name = ctx->argv[1]; if (ctx->argc == 2) { -- 2.30.2