From 1be4decb04be48d73ea90f6feb0f33af25499c19 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 14 May 2020 21:23:36 -0300 Subject: [PATCH] lib: northbound style fixes Signed-off-by: Renato Westphal --- lib/northbound.c | 11 +++++------ lib/northbound.h | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/northbound.c b/lib/northbound.c index 18bd4f5fd8..c49aff70be 100644 --- a/lib/northbound.c +++ b/lib/northbound.c @@ -735,7 +735,7 @@ int nb_running_lock(enum nb_client client, const void *user) { int ret = -1; - frr_with_mutex(&running_config_mgmt_lock.mtx) { + frr_with_mutex (&running_config_mgmt_lock.mtx) { if (!running_config_mgmt_lock.locked) { running_config_mgmt_lock.locked = true; running_config_mgmt_lock.owner_client = client; @@ -751,7 +751,7 @@ int nb_running_unlock(enum nb_client client, const void *user) { int ret = -1; - frr_with_mutex(&running_config_mgmt_lock.mtx) { + frr_with_mutex (&running_config_mgmt_lock.mtx) { if (running_config_mgmt_lock.locked && running_config_mgmt_lock.owner_client == client && running_config_mgmt_lock.owner_user == user) { @@ -769,7 +769,7 @@ int nb_running_lock_check(enum nb_client client, const void *user) { int ret = -1; - frr_with_mutex(&running_config_mgmt_lock.mtx) { + frr_with_mutex (&running_config_mgmt_lock.mtx) { if (!running_config_mgmt_lock.locked || (running_config_mgmt_lock.owner_client == client && running_config_mgmt_lock.owner_user == user)) @@ -962,7 +962,6 @@ static int nb_callback_configuration(const enum nb_event event, union nb_resource *resource; int ret = NB_ERR; - if (event == NB_EV_VALIDATE) resource = NULL; else @@ -1014,8 +1013,8 @@ static int nb_callback_configuration(const enum nb_event event, break; default: flog_err(EC_LIB_DEVELOPMENT, - "%s: unknown event (%u) [xpath %s]", - __func__, event, xpath); + "%s: unknown event (%u) [xpath %s]", __func__, + event, xpath); exit(1); } diff --git a/lib/northbound.h b/lib/northbound.h index 84382eeb60..44727ca0df 100644 --- a/lib/northbound.h +++ b/lib/northbound.h @@ -1044,8 +1044,8 @@ extern void *nb_running_unset_entry(const struct lyd_node *dnode); * Returns: * User pointer if found, NULL otherwise. */ -extern void *nb_running_get_entry(const struct lyd_node *dnode, const char *xpath, - bool abort_if_not_found); +extern void *nb_running_get_entry(const struct lyd_node *dnode, + const char *xpath, bool abort_if_not_found); /* * Return a human-readable string representing a northbound event. -- 2.39.5