yangre MAINTENANCE source formatting
#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)
@@ -153,12 +153,12 @@ main(int argc, char* argv[])
}
while ((l = getline(&str, &len, infile)) != -1) {
- if (!blankline && str[0] == '\n') {
+ 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 @@ main(int argc, char* argv[])
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] == ' ') {
