Skip to content

Commit

Permalink
lib: fix checkpatch warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hopps <[email protected]>
  • Loading branch information
choppsv1 committed Dec 9, 2023
1 parent 09461e7 commit 43eaf46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/yang.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ uint8_t *yang_print_tree(const struct lyd_node *root, LYD_FORMAT format,
uint32_t options)
{
uint8_t *darr = NULL;

if (yang_print_tree_append(&darr, root, format, options))
return NULL;
return darr;
Expand Down Expand Up @@ -743,6 +744,7 @@ struct ly_ctx *yang_ctx_new_setup(bool embedded_modules, bool explicit_compile)
{
struct ly_ctx *ctx = NULL;
const char *yang_models_path = YANG_MODELS_PATH;
uint options;
LY_ERR err;

if (access(yang_models_path, R_OK | X_OK)) {
Expand All @@ -756,7 +758,7 @@ struct ly_ctx *yang_ctx_new_setup(bool embedded_modules, bool explicit_compile)
YANG_MODELS_PATH);
}

uint options = LY_CTX_NO_YANGLIBRARY | LY_CTX_DISABLE_SEARCHDIR_CWD;
options = LY_CTX_NO_YANGLIBRARY | LY_CTX_DISABLE_SEARCHDIR_CWD;
if (explicit_compile)
options |= LY_CTX_EXPLICIT_COMPILE;
err = ly_ctx_new(yang_models_path, options, &ctx);
Expand Down

0 comments on commit 43eaf46

Please sign in to comment.