summaryrefslogtreecommitdiff
path: root/lib/northbound_cli.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-02-24 07:37:09 -0500
committerGitHub <noreply@github.com>2023-02-24 07:37:09 -0500
commit7cedcf270e01097ed2d675e12f9be0dfd4f7d69b (patch)
tree8348d055ddc0c956ecdadcc64c508ecfebc9c92a /lib/northbound_cli.c
parentba995a720b498955720f0caeeb4d26bac2b84be4 (diff)
parent41ef7327e3ebf9f0293c6046190aceb9d44f8414 (diff)
Merge pull request #12889 from LabNConsulting/chopps/fix-nb-context-arg
lib: fix init. use of nb_context to be by value not by reference
Diffstat (limited to 'lib/northbound_cli.c')
-rw-r--r--lib/northbound_cli.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c
index 0dfa66b37e..fa5884fb78 100644
--- a/lib/northbound_cli.c
+++ b/lib/northbound_cli.c
@@ -46,7 +46,7 @@ static int nb_cli_classic_commit(struct vty *vty)
context.client = NB_CLIENT_CLI;
context.user = vty;
- ret = nb_candidate_commit(&context, vty->candidate_config, true, NULL,
+ ret = nb_candidate_commit(context, vty->candidate_config, true, NULL,
NULL, errmsg, sizeof(errmsg));
switch (ret) {
case NB_OK:
@@ -313,7 +313,7 @@ int nb_cli_confirmed_commit_rollback(struct vty *vty)
context.client = NB_CLIENT_CLI;
context.user = vty;
ret = nb_candidate_commit(
- &context, vty->confirmed_commit_rollback, true,
+ context, vty->confirmed_commit_rollback, true,
"Rollback to previous configuration - confirmed commit has timed out",
&transaction_id, errmsg, sizeof(errmsg));
if (ret == NB_OK) {
@@ -394,9 +394,8 @@ static int nb_cli_commit(struct vty *vty, bool force,
context.client = NB_CLIENT_CLI;
context.user = vty;
- ret = nb_candidate_commit(&context, vty->candidate_config, true,
- comment, &transaction_id, errmsg,
- sizeof(errmsg));
+ ret = nb_candidate_commit(context, vty->candidate_config, true, comment,
+ &transaction_id, errmsg, sizeof(errmsg));
/* Map northbound return code to CLI return code. */
switch (ret) {
@@ -1717,7 +1716,7 @@ static int nb_cli_rollback_configuration(struct vty *vty,
context.client = NB_CLIENT_CLI;
context.user = vty;
- ret = nb_candidate_commit(&context, candidate, true, comment, NULL,
+ ret = nb_candidate_commit(context, candidate, true, comment, NULL,
errmsg, sizeof(errmsg));
nb_config_free(candidate);
switch (ret) {