libyang MAINTENANCE source formatting
diff --git a/src/parser_json.c b/src/parser_json.c
index cc59ff4..a8ce252 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -541,6 +541,7 @@
LY_LIST_FOR(meta_container->child, meta_iter) {
/* convert opaq node to a attribute of the opaq node */
struct lyd_node_opaq *meta = (struct lyd_node_opaq *)meta_iter;
+
ret = lyd_create_attr(node, NULL, lydctx->jsonctx->ctx, meta->name.name, strlen(meta->name.name),
meta->name.prefix, ly_strlen(meta->name.prefix), meta->name.module_name,
ly_strlen(meta->name.module_name), meta->value, ly_strlen(meta->value), NULL, LY_PREF_JSON,
@@ -1330,7 +1331,7 @@
LY_CHECK_ERR_RET(ret = lyjson_ctx_new(ctx, in, &lydctx->jsonctx), free(lydctx), ret);
*status = lyjson_ctx_status(lydctx->jsonctx, 0);
- if (*status == LYJSON_END || *status == LYJSON_OBJECT_EMPTY || *status == LYJSON_OBJECT) {
+ if ((*status == LYJSON_END) || (*status == LYJSON_OBJECT_EMPTY) || (*status == LYJSON_OBJECT)) {
*lydctx_p = lydctx;
return LY_SUCCESS;
} else {
diff --git a/src/tree_data.c b/src/tree_data.c
index e416666..9380fe6 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -3412,7 +3412,7 @@
/* data instances are ordered, so we can stop when we found instance of other schema node */
for (iter = instance; iter->schema == instance->schema; iter = iter->prev) {
- if (pos && iter->next == NULL) {
+ if (pos && (iter->next == NULL)) {
/* overrun to the end of the siblings list */
break;
}
@@ -3435,7 +3435,7 @@
if (node->parent) {
start = node->parent->child;
} else {
- for (start = (struct lyd_node *)node; start->prev->next; start = start->prev);
+ for (start = (struct lyd_node *)node; start->prev->next; start = start->prev) {}
}
return start;
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index dc9ef81..9b23c94 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -1628,4 +1628,3 @@
}
return 0;
}
-