From: Kirill Isakov Date: Thu, 29 Jul 2021 17:14:12 +0000 (+0600) Subject: Remove unused global variables. X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=a29e6b49ef7a184941ab8cda2de9487744a82f83 Remove unused global variables. --- diff --git a/src/process.c b/src/process.c index f596eb6c..f3e190c2 100644 --- a/src/process.c +++ b/src/process.c @@ -31,7 +31,6 @@ /* If zero, don't detach from the terminal. */ bool do_detach = true; -bool sigalrm = false; extern char **g_argv; extern bool use_logfile; diff --git a/src/process.h b/src/process.h index 26a9cab6..c6ffda8b 100644 --- a/src/process.h +++ b/src/process.h @@ -22,7 +22,6 @@ */ extern bool do_detach; -extern bool sigalrm; extern void setup_signals(void); extern bool detach(void); diff --git a/src/protocol_key.c b/src/protocol_key.c index 3036d124..77b829b3 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -32,10 +32,6 @@ #include "sptps.h" #include "utils.h" -#ifndef DISABLE_LEGACY -static bool mykeyused = false; -#endif - void send_key_changed(void) { #ifndef DISABLE_LEGACY send_request(everyone, "%d %x %s", KEY_CHANGED, rand(), myself->name); @@ -375,7 +371,6 @@ bool send_ans_key(node_t *to) { bin2hex(key, key, keylen); // Reset sequence number and late packet window - mykeyused = true; to->received_seqno = 0; to->received = 0; diff --git a/src/tincctl.c b/src/tincctl.c index 14faf645..4dd9726f 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -48,7 +48,6 @@ #endif static char **orig_argv; -static int orig_argc; /* If nonzero, display usage information and exit. */ static bool show_help = false; @@ -72,7 +71,6 @@ static int result; bool force = false; bool tty = true; bool confbasegiven = false; -bool netnamegiven = false; char *scriptinterpreter = NULL; char *scriptextension = ""; static char *prompt; @@ -3272,7 +3270,6 @@ static void cleanup() { int main(int argc, char *argv[]) { program_name = argv[0]; orig_argv = argv; - orig_argc = argc; tty = isatty(0) && isatty(1); if(!parse_options(argc, argv)) {