Skip to content

Commit 121cbbb

Browse files
committed
schema compile REFACTOR formatting
1 parent b050075 commit 121cbbb

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/schema_compile_node.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,8 +2203,8 @@ lys_compile_type(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_t
22032203
/* local part */
22042204
tctx_iter = (struct lys_type_item *)tpdf_chain.objs[u];
22052205
if (tctx_iter->tpdf == tctx->tpdf) {
2206-
LOGVAL(ctx->ctx, LYVE_REFERENCE,
2207-
"Invalid \"%s\" type reference - circular chain of types detected.", tctx->tpdf->name);
2206+
LOGVAL(ctx->ctx, LYVE_REFERENCE, "Invalid \"%s\" type reference - circular chain of types detected.",
2207+
tctx->tpdf->name);
22082208
free(tctx);
22092209
ret = LY_EVALID;
22102210
goto cleanup;
@@ -2214,8 +2214,8 @@ lys_compile_type(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_t
22142214
/* global part for unions corner case */
22152215
tctx_iter = (struct lys_type_item *)ctx->tpdf_chain.objs[u];
22162216
if (tctx_iter->tpdf == tctx->tpdf) {
2217-
LOGVAL(ctx->ctx, LYVE_REFERENCE,
2218-
"Invalid \"%s\" type reference - circular chain of types detected.", tctx->tpdf->name);
2217+
LOGVAL(ctx->ctx, LYVE_REFERENCE, "Invalid \"%s\" type reference - circular chain of types detected.",
2218+
tctx->tpdf->name);
22192219
free(tctx);
22202220
ret = LY_EVALID;
22212221
goto cleanup;
@@ -2236,14 +2236,13 @@ lys_compile_type(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_t
22362236

22372237
/* basic checks */
22382238
if (basetype == LY_TYPE_UNKNOWN) {
2239-
LOGVAL(ctx->ctx, LYVE_REFERENCE,
2240-
"Referenced type \"%s\" not found.", tctx_prev ? tctx_prev->tpdf->type.name : type_p->name);
2239+
LOGVAL(ctx->ctx, LYVE_REFERENCE, "Referenced type \"%s\" not found.",
2240+
tctx_prev ? tctx_prev->tpdf->type.name : type_p->name);
22412241
ret = LY_EVALID;
22422242
goto cleanup;
22432243
}
22442244
if (~type_substmt_map[basetype] & type_p->flags) {
2245-
LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "Invalid type restrictions for %s type.",
2246-
ly_data_type2str[basetype]);
2245+
LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "Invalid type restrictions for %s type.", ly_data_type2str[basetype]);
22472246
ret = LY_EVALID;
22482247
goto cleanup;
22492248
}
@@ -2289,8 +2288,7 @@ lys_compile_type(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_t
22892288
ret = LY_EVALID;
22902289
goto cleanup;
22912290
} else if ((basetype == LY_TYPE_EMPTY) && tctx->tpdf->dflt.str) {
2292-
LOGVAL(ctx->ctx, LYVE_SEMANTICS,
2293-
"Invalid type \"%s\" - \"empty\" type must not have a default value (%s).",
2291+
LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Invalid type \"%s\" - \"empty\" type must not have a default value (%s).",
22942292
tctx->tpdf->name, tctx->tpdf->dflt.str);
22952293
ret = LY_EVALID;
22962294
goto cleanup;

0 commit comments

Comments
 (0)