build UPDATE uncrustify version 0.71 -> 0.75
diff --git a/tools/lint/cmd.c b/tools/lint/cmd.c
index 87bc18f..10e7446 100644
--- a/tools/lint/cmd.c
+++ b/tools/lint/cmd.c
@@ -128,6 +128,7 @@
} else if (argc == optind) {
/* no argument - print current value */
LY_LOG_LEVEL level = ly_log_level(LY_LLERR);
+
ly_log_level(level);
printf("Current verbosity level: ");
if (level == LY_LLERR) {
@@ -211,6 +212,7 @@
for (int c = 0; c < argc - optind; ++c) {
int8_t match = 0;
+
/* get the command of the specified name */
for (uint16_t i = 0; commands[i].name; i++) {
if (strcmp(argv[optind + c], commands[i].name) == 0) {
diff --git a/tools/lint/cmd.h b/tools/lint/cmd.h
index beb4ce7..9f6f88d 100644
--- a/tools/lint/cmd.h
+++ b/tools/lint/cmd.h
@@ -23,6 +23,7 @@
*/
typedef struct {
char *name; /* User printable name of the function. */
+
void (*func)(struct ly_ctx **ctx, const char *); /* Function to call to do the command. */
void (*help_func)(void); /* Display command help. */
char *helpstring; /* Documentation for this function. */
diff --git a/tools/lint/cmd_feature.c b/tools/lint/cmd_feature.c
index 603cfd4..1ced1ad 100644
--- a/tools/lint/cmd_feature.c
+++ b/tools/lint/cmd_feature.c
@@ -85,6 +85,7 @@
for (i = 0; i < argc - optind; i++) {
const struct lys_module *mod = ly_ctx_get_module_latest(*ctx, argv[optind + i]);
+
if (!mod) {
YLMSG_E("Module \"%s\" not found.\n", argv[optind + i]);
goto cleanup;
diff --git a/tools/lint/cmd_print.c b/tools/lint/cmd_print.c
index 823ca7b..2702fbf 100644
--- a/tools/lint/cmd_print.c
+++ b/tools/lint/cmd_print.c
@@ -242,6 +242,7 @@
if (node_path) {
const struct lysc_node *node;
+
node = lys_find_path(*ctx, NULL, node_path, 0);
if (!node) {
node = lys_find_path(*ctx, NULL, node_path, 1);
diff --git a/tools/lint/common.c b/tools/lint/common.c
index d651291..9f04872 100644
--- a/tools/lint/common.c
+++ b/tools/lint/common.c
@@ -111,6 +111,7 @@
/* get features list for this module */
for (uint32_t u = 0; u < fset->count; ++u) {
struct schema_features *sf = (struct schema_features *)fset->objs[u];
+
if (!strcmp(module, sf->mod_name)) {
/* matched module - explicitly set features */
*features = (const char **)sf->features;
@@ -396,6 +397,7 @@
/* submodules print */
if (mod->parsed && mod->parsed->includes) {
uint64_t u = 0;
+
ly_print(out, " (");
LY_ARRAY_FOR(mod->parsed->includes, u) {
ly_print(out, "%s%s", !u ? "" : ",", mod->parsed->includes[u].name);
@@ -434,6 +436,7 @@
} else {
for (uint32_t u = 0; u < set->count; ++u) {
struct lyd_node *node = (struct lyd_node *)set->objs[u];
+
printf(" %s \"%s\"", lys_nodetype2str(node->schema->nodetype), node->schema->name);
if (node->schema->nodetype & (LYS_LEAF | LYS_LEAFLIST)) {
printf(" (value: \"%s\")\n", lyd_get_value(node));
@@ -473,6 +476,7 @@
for (uint32_t u = 0; u < inputs->count; ++u) {
struct cmdline_file *input_f = (struct cmdline_file *)inputs->objs[u];
+
switch (data_type) {
case LYD_TYPE_DATA_YANG:
ret = lyd_parse_data(ctx, NULL, input_f->in, input_f->format, options_parse, options_validate, &tree);
diff --git a/tools/lint/main_ni.c b/tools/lint/main_ni.c
index e58e85a..9421e4f 100644
--- a/tools/lint/main_ni.c
+++ b/tools/lint/main_ni.c
@@ -307,6 +307,7 @@
{
for (uint32_t u = 0; u < fset->count; ++u) {
struct schema_features *sf = fset->objs[u];
+
if (!sf->applied) {
return sf;
}
@@ -903,6 +904,7 @@
}
} else if (c.submodule) {
const struct lysp_submodule *submod = ly_ctx_get_submodule_latest(c.ctx, c.submodule);
+
if (!submod) {
YLMSG_E("Unable to find submodule %s.\n", c.submodule);
goto cleanup;