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 500f243..411af2b 100644 (file)
@@ -1013,10 +1013,14 @@ ask_netname:
                                        char *command;
 #ifndef HAVE_MINGW
                                        const char *editor = getenv("VISUAL");
                                        char *command;
 #ifndef HAVE_MINGW
                                        const char *editor = getenv("VISUAL");
-                                       if (!editor)
+
+                                       if(!editor) {
                                                editor = getenv("EDITOR");
                                                editor = getenv("EDITOR");
-                                       if (!editor)
+                                       }
+
+                                       if(!editor) {
                                                editor = "vi";
                                                editor = "vi";
+                                       }
 
                                        xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
 #else
 
                                        xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
 #else
index 4ff701e..0452b25 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;
 
 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);
        }
        if(verbose) {
                fprintf(stderr, "Received type %d record of %u bytes:\n", type, len);
        }
index dccd49d..a4bb591 100644 (file)
@@ -2440,10 +2440,14 @@ static int cmd_edit(int argc, char *argv[]) {
        char *command;
 #ifndef HAVE_MINGW
        const char *editor = getenv("VISUAL");
        char *command;
 #ifndef HAVE_MINGW
        const char *editor = getenv("VISUAL");
-       if (!editor)
+
+       if(!editor) {
                editor = getenv("EDITOR");
                editor = getenv("EDITOR");
-       if (!editor)
+       }
+
+       if(!editor) {
                editor = "vi";
                editor = "vi";
+       }
 
        xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
 #else
 
        xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
 #else