diff --git a/tools/re/main.c b/tools/re/main.c
index 1cec6de..c8d066f 100644
--- a/tools/re/main.c
+++ b/tools/re/main.c
@@ -15,16 +15,16 @@
 #define _GNU_SOURCE
 
 #include <errno.h>
+#include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/types.h>
 #include <string.h>
-#include <getopt.h>
+#include <sys/types.h>
 
 #include "libyang.h"
 
-#include "tools/config.h"
 #include "compat.h"
+#include "tools/config.h"
 
 void
 help(void)
@@ -36,26 +36,26 @@
     fprintf(stdout, "    yangre [-V] -f <file>\n");
     fprintf(stdout, "Returns 0 if string matches the pattern(s), 1 if not and -1 on error.\n\n");
     fprintf(stdout, "Options:\n"
-        "  -h, --help              Show this help message and exit.\n"
-        "  -v, --version           Show version number and exit.\n"
-        "  -V, --verbose           Print the processing information.\n"
-        "  -i, --invert-match      Invert-match modifier for the closest preceding\n"
-        "                          pattern.\n"
-        "  -p, --pattern=\"REGEXP\"  Regular expression including the quoting,\n"
-        "                          which is applied the same way as in a YANG module.\n"
-        "  -f, --file=\"FILE\"     List of patterns and the <string> (separated by an\n"
-        "                          empty line) are taken from <file>. Invert-match is\n"
-        "                          indicated by the single space character at the \n"
-        "                          beginning of the pattern line. YANG quotation around\n"
-        "                          patterns is still expected, but that avoids issues with\n"
-        "                          reading quotation by shell. Avoid newline at the end\n"
-        "                          of the string line to represent empty <string>.");
+            "  -h, --help              Show this help message and exit.\n"
+            "  -v, --version           Show version number and exit.\n"
+            "  -V, --verbose           Print the processing information.\n"
+            "  -i, --invert-match      Invert-match modifier for the closest preceding\n"
+            "                          pattern.\n"
+            "  -p, --pattern=\"REGEXP\"  Regular expression including the quoting,\n"
+            "                          which is applied the same way as in a YANG module.\n"
+            "  -f, --file=\"FILE\"     List of patterns and the <string> (separated by an\n"
+            "                          empty line) are taken from <file>. Invert-match is\n"
+            "                          indicated by the single space character at the \n"
+            "                          beginning of the pattern line. YANG quotation around\n"
+            "                          patterns is still expected, but that avoids issues with\n"
+            "                          reading quotation by shell. Avoid newline at the end\n"
+            "                          of the string line to represent empty <string>.");
     fprintf(stdout, "Examples:\n"
-        "  pattern \"[0-9a-fA-F]*\";      -> yangre -p '\"[0-9a-fA-F]*\"' '1F'\n"
-        "  pattern '[a-zA-Z0-9\\-_.]*';  -> yangre -p \"'[a-zA-Z0-9\\-_.]*'\" 'a-b'\n"
-        "  pattern [xX][mM][lL].*;      -> yangre -p '[xX][mM][lL].*' 'xml-encoding'\n\n");
+            "  pattern \"[0-9a-fA-F]*\";      -> yangre -p '\"[0-9a-fA-F]*\"' '1F'\n"
+            "  pattern '[a-zA-Z0-9\\-_.]*';  -> yangre -p \"'[a-zA-Z0-9\\-_.]*'\" 'a-b'\n"
+            "  pattern [xX][mM][lL].*;      -> yangre -p '[xX][mM][lL].*' 'xml-encoding'\n\n");
     fprintf(stdout, "Note that to pass YANG quoting through your shell, you are supposed to use\n"
-                    "the other quotation around. For not-quoted patterns, use single quotes.\n\n");
+            "the other quotation around. For not-quoted patterns, use single quotes.\n\n");
 }
 
 void
@@ -75,11 +75,11 @@
 }
 
 static const char *module_start = "module yangre {"
-    "yang-version 1.1;"
-    "namespace urn:cesnet:libyang:yangre;"
-    "prefix re;"
-    "leaf pattern {"
-    "  type string {";
+        "yang-version 1.1;"
+        "namespace urn:cesnet:libyang:yangre;"
+        "prefix re;"
+        "leaf pattern {"
+        "  type string {";
 static const char *module_invertmatch = " { modifier invert-match; }";
 static const char *module_match = ";";
 static const char *module_end = "}}}";
@@ -107,7 +107,7 @@
 }
 
 int
-main(int argc, char* argv[])
+main(int argc, char *argv[])
 {
     LY_ERR match;
     int i, opt_index = 0, ret = -1, verbose = 0, blankline = 0;
@@ -152,13 +152,13 @@
                 goto cleanup;
             }
 
-            while((l = getline(&str, &len, infile)) != -1) {
-                if (!blankline && str[0] == '\n') {
+            while ((l = getline(&str, &len, infile)) != -1) {
+                if (!blankline && (str[0] == '\n')) {
                     /* blank line */
                     blankline = 1;
                     continue;
                 }
-                if (str[0] != '\n' && str[l - 1] == '\n') {
+                if ((str[0] != '\n') && (str[l - 1] == '\n')) {
                     /* remove ending newline */
                     str[l - 1] = '\0';
                 }
@@ -168,7 +168,7 @@
                     break;
                     /* else read the patterns */
                 } else if (add_pattern(&patterns, &invert_match, &patterns_count,
-                                       str[0] == ' ' ? &str[1] : str)) {
+                        (str[0] == ' ') ? &str[1] : str)) {
                     goto cleanup;
                 }
                 if (str[0] == ' ') {
@@ -239,7 +239,7 @@
         str = argv[optind];
     }
 
-    for (modstr = (char*)module_start, i = 0; i < patterns_count; i++) {
+    for (modstr = (char *)module_start, i = 0; i < patterns_count; i++) {
         if (asprintf(&s, "%s pattern %s%s", modstr, patterns[i], invert_match[i] ? module_invertmatch : module_match) == -1) {
             fprintf(stderr, "yangre error: memory allocation failed.\n");
             goto cleanup;
