From: Guus Sliepen Date: Thu, 18 Oct 2018 14:15:19 +0000 (+0200) Subject: Reformat the code using astyle. X-Git-Tag: release-1.1pre18~47 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=1af8ca58b86f5956d6acd9f63083a84666647ef0;p=tinc Reformat the code using astyle. --- diff --git a/src/invitation.c b/src/invitation.c index 500f2434..411af2bf 100644 --- a/src/invitation.c +++ b/src/invitation.c @@ -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 diff --git a/src/sptps_test.c b/src/sptps_test.c index 4ff701ef..0452b25c 100644 --- a/src/sptps_test.c +++ b/src/sptps_test.c @@ -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); } diff --git a/src/tincctl.c b/src/tincctl.c index dccd49d8..a4bb5912 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -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