[ovs-dev] [PATCH] ovsdb-client: Fix a bug that uses wrong index

Yifeng Sun pkusunyifeng at gmail.com
Thu Sep 27 21:31:40 UTC 2018


This patch fixes the incorrect index to argv.

Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
---
 ovsdb/ovsdb-client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c
index ab3aa7c93307..7c8a59d0e749 100644
--- a/ovsdb/ovsdb-client.c
+++ b/ovsdb/ovsdb-client.c
@@ -1761,9 +1761,9 @@ do_dump(struct jsonrpc *rpc, const char *database,
         for (i = 1; i < argc; i++) {
             node = shash_find(&tschema->columns, argv[i]);
             if (!node) {
-                ovs_fatal(0, "Table \"%s\" has no column %s.", argv[0], argv[1]);
+                ovs_fatal(0, "Table \"%s\" has no column %s.", argv[0], argv[i]);
             }
-            shash_add(&custom_columns, argv[1], node->data);
+            shash_add(&custom_columns, argv[i], node->data);
         }
     } else {
         tables = shash_sort(&schema->tables);
-- 
2.7.4



More information about the dev mailing list