uncrustify FORMAT set various uncrustify options

PR #1228
diff --git a/src/context.c b/src/context.c
index 771a310..85ae0d1 100644
--- a/src/context.c
+++ b/src/context.c
@@ -39,12 +39,12 @@
 #include "tree_schema_internal.h"
 #include "xpath.h"
 
-#include "../models/ietf-yang-metadata@2016-08-05.h"
-#include "../models/yang@2020-06-17.h"
-#include "../models/ietf-inet-types@2013-07-15.h"
-#include "../models/ietf-yang-types@2013-07-15.h"
 #include "../models/ietf-datastores@2018-02-14.h"
+#include "../models/ietf-inet-types@2013-07-15.h"
 #include "../models/ietf-yang-library@2019-01-04.h"
+#include "../models/ietf-yang-metadata@2016-08-05.h"
+#include "../models/ietf-yang-types@2013-07-15.h"
+#include "../models/yang@2020-06-17.h"
 #define IETF_YANG_LIB_REV "2019-01-04"
 
 static struct internal_modules_s {
@@ -76,20 +76,20 @@
     if (search_dir) {
         new_dir = realpath(search_dir, NULL);
         LY_CHECK_ERR_RET(!new_dir,
-                         LOGERR(ctx, LY_ESYS, "Unable to use search directory \"%s\" (%s).", search_dir, strerror(errno)),
-                         LY_EINVAL);
+                LOGERR(ctx, LY_ESYS, "Unable to use search directory \"%s\" (%s).", search_dir, strerror(errno)),
+                LY_EINVAL);
         if (strcmp(search_dir, new_dir)) {
             LOGVRB("Canonicalizing search directory string from \"%s\" to \"%s\".", search_dir, new_dir);
         }
         LY_CHECK_ERR_RET(access(new_dir, R_OK | X_OK),
-                         LOGERR(ctx, LY_ESYS, "Unable to fully access search directory \"%s\" (%s).", new_dir, strerror(errno)); free(new_dir),
-                         LY_EINVAL);
+                LOGERR(ctx, LY_ESYS, "Unable to fully access search directory \"%s\" (%s).", new_dir, strerror(errno)); free(new_dir),
+                LY_EINVAL);
         LY_CHECK_ERR_RET(stat(new_dir, &st),
-                         LOGERR(ctx, LY_ESYS, "stat() failed for \"%s\" (%s).", new_dir, strerror(errno)); free(new_dir),
-                         LY_ESYS);
+                LOGERR(ctx, LY_ESYS, "stat() failed for \"%s\" (%s).", new_dir, strerror(errno)); free(new_dir),
+                LY_ESYS);
         LY_CHECK_ERR_RET(!S_ISDIR(st.st_mode),
-                         LOGERR(ctx, LY_ESYS, "Given search directory \"%s\" is not a directory.", new_dir); free(new_dir),
-                         LY_EINVAL);
+                LOGERR(ctx, LY_ESYS, "Given search directory \"%s\" is not a directory.", new_dir); free(new_dir),
+                LY_EINVAL);
         /* avoid path duplication */
         for (uint32_t u = 0; u < ctx->search_paths.count; ++u) {
             if (!strcmp(new_dir, ctx->search_paths.objs[u])) {
@@ -229,7 +229,7 @@
                 rc = LY_SUCCESS;
             }
         }
-        if (*dir && rc == LY_SUCCESS) {
+        if (*dir && (rc == LY_SUCCESS)) {
             rc = ly_ctx_set_searchdir(ctx, dir);
             if (rc == LY_EEXIST) {
                 /* ignore duplication */
@@ -253,7 +253,7 @@
     for (i = 0; i < ((options & LY_CTX_NOYANGLIBRARY) ? (LY_INTERNAL_MODS_COUNT - 2) : LY_INTERNAL_MODS_COUNT); i++) {
         ly_in_memory(in, internal_modules[i].data);
         LY_CHECK_GOTO(rc = lys_create_module(ctx, in, internal_modules[i].format, internal_modules[i].implemented,
-                                             NULL, NULL, &module), error);
+                NULL, NULL, &module), error);
     }
 
     ly_in_free(in, 0);
@@ -358,7 +358,7 @@
     for ( ; *index < ctx->list.count; ++(*index)) {
         mod = ctx->list.objs[*index];
         value = *(const char **)(((int8_t *)(mod)) + key_offset);
-        if ((!key_size && !strcmp(key, value)) || (key_size && !strncmp(key, value, key_size) && value[key_size] == '\0')) {
+        if ((!key_size && !strcmp(key, value)) || (key_size && !strncmp(key, value, key_size) && (value[key_size] == '\0'))) {
             /* increment index for the next run */
             ++(*index);
             return mod;
@@ -565,7 +565,7 @@
     /* compile */
     oper = output ? LY_PATH_OPER_OUTPUT : LY_PATH_OPER_INPUT;
     ret = ly_path_compile(ctx, NULL, ctx_node, exp, LY_PATH_LREF_FALSE, oper, LY_PATH_TARGET_MANY,
-                          LY_PREF_JSON, NULL, &p);
+            LY_PREF_JSON, NULL, &p);
     LY_CHECK_GOTO(ret, cleanup);
 
     /* get last node */
@@ -762,7 +762,7 @@
 
         /* conformance-type */
         LY_CHECK_GOTO(ret = lyd_new_term(cont, NULL, "conformance-type", mod->implemented ? "implement" : "import",
-                                         NULL), error);
+                NULL), error);
 
         /* submodule list */
         LY_CHECK_GOTO(ret = ylib_submodules(cont, mod, 0), error);