summaryrefslogtreecommitdiff
path: root/lib/northbound.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-03-20 15:07:44 -0400
committerChristian Hopps <chopps@gmail.com>2023-03-22 05:22:56 +0000
commit39c329bbd18b2df9b3d13c31d978555ec33b0758 (patch)
tree9cf4235d6d2fe5f8992c2d8380eb7ea5b0391ab4 /lib/northbound.c
parent1401ee8bf74b7688ca5f5bdfc3411734e9f0cb3b (diff)
lib: staticd: vtysh: apply frrbot style requirements
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound.c')
-rw-r--r--lib/northbound.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/northbound.c b/lib/northbound.c
index b91308fb1a..24f7ecd70c 100644
--- a/lib/northbound.c
+++ b/lib/northbound.c
@@ -846,8 +846,8 @@ void nb_candidate_edit_config_changes(
/* Handle relative XPaths. */
memset(xpath, 0, sizeof(xpath));
- if (xpath_index > 0
- && (xpath_base[0] == '.' || change->xpath[0] == '.'))
+ if (xpath_index > 0 &&
+ (xpath_base[0] == '.' || change->xpath[0] == '.'))
strlcpy(xpath, curr_xpath, sizeof(xpath));
if (xpath_base[0]) {
if (xpath_base[0] == '.')
@@ -947,9 +947,9 @@ int nb_candidate_validate_yang(struct nb_config *candidate, bool no_state,
char *errmsg, size_t errmsg_len)
{
if (lyd_validate_all(&candidate->dnode, ly_native_ctx,
- no_state ? LYD_VALIDATE_NO_STATE :
- LYD_VALIDATE_PRESENT, NULL)
- != 0) {
+ no_state ? LYD_VALIDATE_NO_STATE
+ : LYD_VALIDATE_PRESENT,
+ NULL) != 0) {
yang_print_errors(ly_native_ctx, errmsg, errmsg_len);
return NB_ERR_VALIDATION;
}
@@ -1005,8 +1005,7 @@ int nb_candidate_diff_and_validate_yang(struct nb_context *context,
char *errmsg, size_t errmsg_len)
{
if (nb_candidate_validate_yang(candidate, true, errmsg,
- sizeof(errmsg_len))
- != NB_OK)
+ sizeof(errmsg_len)) != NB_OK)
return NB_ERR_VALIDATION;
RB_INIT(nb_config_cbs, changes);
@@ -1043,9 +1042,9 @@ int nb_candidate_commit_prepare(struct nb_context context,
{
struct nb_config_cbs changes;
- if (!skip_validate
- && nb_candidate_validate_yang(candidate, true, errmsg, errmsg_len)
- != NB_OK) {
+ if (!skip_validate &&
+ nb_candidate_validate_yang(candidate, true, errmsg, errmsg_len) !=
+ NB_OK) {
flog_warn(EC_LIB_NB_CANDIDATE_INVALID,
"%s: failed to validate candidate configuration",
__func__);
@@ -1061,10 +1060,9 @@ int nb_candidate_commit_prepare(struct nb_context context,
return NB_ERR_NO_CHANGES;
}
- if (!skip_validate
- && nb_candidate_validate_code(&context, candidate, &changes, errmsg,
- errmsg_len)
- != NB_OK) {
+ if (!skip_validate &&
+ nb_candidate_validate_code(&context, candidate, &changes, errmsg,
+ errmsg_len) != NB_OK) {
flog_warn(EC_LIB_NB_CANDIDATE_INVALID,
"%s: failed to validate candidate configuration",
__func__);