From 1af8ca58b86f5956d6acd9f63083a84666647ef0 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 18 Oct 2018 16:15:19 +0200 Subject: [PATCH] Reformat the code using astyle. --- src/invitation.c | 8 ++++++-- src/sptps_test.c | 1 + src/tincctl.c | 8 ++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/invitation.c b/src/invitation.c index 500f243..411af2b 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 4ff701e..0452b25 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 dccd49d..a4bb591 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 -- 2.25.1