]> git.ipfire.org Git - thirdparty/nqptp.git/commitdiff
Clang Format
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 25 Apr 2021 17:39:37 +0000 (18:39 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 25 Apr 2021 17:39:37 +0000 (18:39 +0100)
nqptp.c

diff --git a/nqptp.c b/nqptp.c
index f3504eb9f6cb9ea98168daf48d2e06c2c235788f..504750e862a791a06dbcb217c05999c53a6c6a31 100644 (file)
--- a/nqptp.c
+++ b/nqptp.c
@@ -16,8 +16,8 @@
  *
  * Commercial licensing is also available.
  */
-#include "config.h"
 #include "nqptp.h"
+#include "config.h"
 #include "debug.h"
 #include "general-utilities.h"
 #include "nqptp-clock-sources.h"
@@ -119,24 +119,23 @@ int main(int argc, char **argv) {
 
   int debug_level = 0;
   int i;
-  for( i = 1; i < argc; ++i ) {
-    if( argv[i][0] == '-' ) {
-      if(strcmp(argv[i] + 1,  "V") == 0) {
-        fprintf(stdout, "%s\n",PACKAGE_STRING);
+  for (i = 1; i < argc; ++i) {
+    if (argv[i][0] == '-') {
+      if (strcmp(argv[i] + 1, "V") == 0) {
+        fprintf(stdout, "%s\n", PACKAGE_STRING);
         exit(EXIT_SUCCESS);
-      } else if(strcmp(argv[i] + 1,  "vvv") == 0 ) {
+      } else if (strcmp(argv[i] + 1, "vvv") == 0) {
         debug_level = 3;
-      } else if( strcmp(argv[i] + 1,  "vv" ) == 0 ) {
+      } else if (strcmp(argv[i] + 1, "vv") == 0) {
         debug_level = 2;
-      } else if( strcmp(argv[i] + 1,  "v" ) == 0 ) {
+      } else if (strcmp(argv[i] + 1, "v") == 0) {
         debug_level = 1;
-      } else if( strcmp(argv[i] + 1,  "h" ) == 0 ) {
-        fprintf(stdout,
-          "    -V     print version,\n"
-          "    -v     verbose log,\n"
-          "    -vv    more verbose log,\n"
-          "    -vvv   very verbose log,\n"
-          "    -h     this help text.\n");
+      } else if (strcmp(argv[i] + 1, "h") == 0) {
+        fprintf(stdout, "    -V     print version,\n"
+                        "    -v     verbose log,\n"
+                        "    -vv    more verbose log,\n"
+                        "    -vvv   very verbose log,\n"
+                        "    -h     this help text.\n");
         exit(EXIT_SUCCESS);
       } else {
         fprintf(stdout, "%s -- unknown option. Program terminated.\n", argv[0]);