schema compile MAINTENANCE better usage of LY_CHECK_GOTO macro
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index 4dd050a..69f76cb 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -6921,24 +6921,20 @@
 
     /* data nodes */
     LY_LIST_FOR(sp->data, node_p) {
-        ret = lys_compile_node(&ctx, node_p, NULL, 0);
-        LY_CHECK_GOTO(ret, error);
+        LY_CHECK_GOTO(ret = lys_compile_node(&ctx, node_p, NULL, 0), error);
     }
 
     COMPILE_ARRAY1_GOTO(&ctx, sp->rpcs, mod_c->rpcs, NULL, u, lys_compile_action, 0, ret, error);
     COMPILE_ARRAY1_GOTO(&ctx, sp->notifs, mod_c->notifs, NULL, u, lys_compile_notif, 0, ret, error);
 
     /* augments - sort first to cover augments augmenting other augments */
-    ret = lys_compile_augment_sort(&ctx, sp->augments, sp->includes, &augments);
-    LY_CHECK_GOTO(ret, error);
+    LY_CHECK_GOTO(ret = lys_compile_augment_sort(&ctx, sp->augments, sp->includes, &augments), error);
     LY_ARRAY_FOR(augments, u) {
-        ret = lys_compile_augment(&ctx, augments[u], NULL);
-        LY_CHECK_GOTO(ret, error);
+        LY_CHECK_GOTO(ret = lys_compile_augment(&ctx, augments[u], NULL), error);
     }
 
     /* deviations TODO cover deviations from submodules */
-    ret = lys_compile_deviations(&ctx, sp);
-    LY_CHECK_GOTO(ret, error);
+    LY_CHECK_GOTO(ret = lys_compile_deviations(&ctx, sp), error);
 
     /* extension instances TODO cover extension instances from submodules */
     COMPILE_EXTS_GOTO(&ctx, sp->exts, mod_c->exts, mod_c, LYEXT_PAR_MODULE, ret, error);
@@ -6952,15 +6948,14 @@
             type = ((struct lysc_node_leaf*)ctx.unres.objs[u])->type;
             if (type->basetype == LY_TYPE_LEAFREF) {
                 /* validate the path */
-                ret = lys_compile_leafref_validate(&ctx, ((struct lysc_node*)ctx.unres.objs[u]), (struct lysc_type_leafref*)type);
-                LY_CHECK_GOTO(ret, error);
+                LY_CHECK_GOTO(ret = lys_compile_leafref_validate(&ctx, ((struct lysc_node*)ctx.unres.objs[u]), (struct lysc_type_leafref*)type), error);
             } else if (type->basetype == LY_TYPE_UNION) {
                 LY_ARRAY_FOR(((struct lysc_type_union*)type)->types, v) {
                     if (((struct lysc_type_union*)type)->types[v]->basetype == LY_TYPE_LEAFREF) {
                         /* validate the path */
-                        ret = lys_compile_leafref_validate(&ctx, ((struct lysc_node*)ctx.unres.objs[u]),
-                                                           (struct lysc_type_leafref*)((struct lysc_type_union*)type)->types[v]);
-                        LY_CHECK_GOTO(ret, error);
+                        LY_CHECK_GOTO(ret = lys_compile_leafref_validate(&ctx, ((struct lysc_node*)ctx.unres.objs[u]),
+                                                                         (struct lysc_type_leafref*)((struct lysc_type_union*)type)->types[v]),
+                                      error);
                     }
                 }
             }
@@ -7012,14 +7007,14 @@
     ctx.options |= LYSC_OPT_GROUPING;
     LY_ARRAY_FOR(sp->groupings, u) {
         if (!(sp->groupings[u].flags & LYS_USED_GRP)) {
-            LY_CHECK_GOTO((ret = lys_compile_grouping(&ctx, node_p, &sp->groupings[u])) != LY_SUCCESS, error);
+            LY_CHECK_GOTO(ret = lys_compile_grouping(&ctx, node_p, &sp->groupings[u]), error);
         }
     }
     LY_LIST_FOR(sp->data, node_p) {
         grps = (struct lysp_grp*)lysp_node_groupings(node_p);
         LY_ARRAY_FOR(grps, u) {
             if (!(grps[u].flags & LYS_USED_GRP)) {
-                LY_CHECK_GOTO((ret = lys_compile_grouping(&ctx, node_p, &grps[u])) != LY_SUCCESS, error);
+                LY_CHECK_GOTO(ret = lys_compile_grouping(&ctx, node_p, &grps[u]), error);
             }
         }
     }