Reformat the code using astyle.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 18 Oct 2018 14:15:19 +0000 (16:15 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 18 Oct 2018 14:15:19 +0000 (16:15 +0200)
src/invitation.c
src/sptps_test.c
src/tincctl.c

index 500f2434b77e150a0d2f566e2fa89e6693d13380..411af2bf4b9b6d51e7072600cb866ae67972db97 100644 (file)
@@ -1013,10 +1013,14 @@ ask_netname:
                                        char *command;
 #ifndef HAVE_MINGW
                                        const char *editor = getenv("VISUAL");
-                                       if (!editor)
+
+                                       if(!editor) {
                                                editor = getenv("EDITOR");
-                                       if (!editor)
+                                       }
+
+                                       if(!editor) {
                                                editor = "vi";
+                                       }
 
                                        xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
 #else
index 4ff701efc8a76f33faf5c846ce292c10449665c4..0452b25cc918ae223836e1803896bf2eaeb1b7ac 100644 (file)
@@ -78,6 +78,7 @@ static bool send_data(void *handle, uint8_t type, const void *data, size_t len)
 
 static bool receive_record(void *handle, uint8_t type, const void *data, uint16_t len) {
        (void)handle;
+
        if(verbose) {
                fprintf(stderr, "Received type %d record of %u bytes:\n", type, len);
        }
index dccd49d88fd08a29449d03d579217f38190f44fa..a4bb5912ba2880720fe0e73935781963da1576b8 100644 (file)
@@ -2440,10 +2440,14 @@ static int cmd_edit(int argc, char *argv[]) {
        char *command;
 #ifndef HAVE_MINGW
        const char *editor = getenv("VISUAL");
-       if (!editor)
+
+       if(!editor) {
                editor = getenv("EDITOR");
-       if (!editor)
+       }
+
+       if(!editor) {
                editor = "vi";
+       }
 
        xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
 #else