summaryrefslogtreecommitdiff
path: root/tests/test-ovsdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-ovsdb.c')
-rw-r--r--tests/test-ovsdb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
index 86d75dfd9..432977159 100644
--- a/tests/test-ovsdb.c
+++ b/tests/test-ovsdb.c
@@ -2744,13 +2744,15 @@ print_idl_row_simple2(const struct idltest_simple2 *s, int step)
printf("%03d: name=%s smap=[",
step, s->name);
for (i = 0; i < smap->n; i++) {
- printf("[%s : %s]%s", smap->keys[i].string, smap->values[i].string,
- i < smap->n-1? ",": "");
+ printf("[%s : %s]%s",
+ smap->keys[i].s->string, smap->values[i].s->string,
+ i < smap->n - 1 ? "," : "");
}
printf("] imap=[");
for (i = 0; i < imap->n; i++) {
- printf("[%"PRId64" : %s]%s", imap->keys[i].integer, imap->values[i].string,
- i < imap->n-1? ",":"");
+ printf("[%"PRId64" : %s]%s",
+ imap->keys[i].integer, imap->values[i].s->string,
+ i < imap->n - 1 ? "," : "");
}
printf("]\n");
}
@@ -2819,8 +2821,8 @@ do_idl_partial_update_map_column(struct ovs_cmdl_context *ctx)
myTxn = ovsdb_idl_txn_create(idl);
smap = idltest_simple2_get_smap(myRow, OVSDB_TYPE_STRING,
OVSDB_TYPE_STRING);
- strcpy(key_to_delete, smap->keys[0].string);
- idltest_simple2_update_smap_delkey(myRow, smap->keys[0].string);
+ ovs_strlcpy(key_to_delete, smap->keys[0].s->string, sizeof key_to_delete);
+ idltest_simple2_update_smap_delkey(myRow, smap->keys[0].s->string);
ovsdb_idl_txn_commit_block(myTxn);
ovsdb_idl_txn_destroy(myTxn);
ovsdb_idl_get_initial_snapshot(idl);