Skip to content

Commit 02395ed

Browse files
committed
init: remove redundant upnp #ifdef
1 parent 0aa014d commit 02395ed

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/init.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,7 @@ void SetupServerArgs(ArgsManager& argsman)
519519
argsman.AddArg("-torcontrol=<ip>:<port>", strprintf("Tor control host and port to use if onion listening enabled (default: %s). If no port is specified, the default port of %i will be used.", DEFAULT_TOR_CONTROL, DEFAULT_TOR_CONTROL_PORT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
520520
argsman.AddArg("-torpassword=<pass>", "Tor control port password (default: empty)", ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, OptionsCategory::CONNECTION);
521521
#ifdef USE_UPNP
522-
#if USE_UPNP
523-
argsman.AddArg("-upnp", "Use UPnP to map the listening port (default: 1 when listening and no -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
524-
#else
525-
argsman.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %u)", 0), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
526-
#endif
522+
argsman.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %u)", DEFAULT_UPNP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
527523
#else
528524
hidden_args.emplace_back("-upnp");
529525
#endif

0 commit comments

Comments
 (0)