From d73e45eff12a8c85083363a63db6d443db4544dc Mon Sep 17 00:00:00 2001 From: Alexandre Quesnel <131881+aquesnel@users.noreply.github.com> Date: Sat, 6 Mar 2021 16:15:42 +0000 Subject: [PATCH] Removing DEBUG() macro --- common/defines.h | 6 ------ xrdp/xrdp.c | 15 ++++++++------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/common/defines.h b/common/defines.h index f65f2bea..ce680d91 100644 --- a/common/defines.h +++ b/common/defines.h @@ -21,12 +21,6 @@ #ifndef DEFINES_H #define DEFINES_H -/* check for debug */ -#ifdef XRDP_DEBUG -#define DEBUG(args) g_writeln args; -#else -#define DEBUG(args) -#endif /* other macros */ #undef MIN #define MIN(x1, x2) ((x1) < (x2) ? (x1) : (x2)) diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index 5c061950..3f4f8595 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -445,7 +445,6 @@ int main(int argc, char **argv) { int exit_status = 0; - int test; enum logReturns error; struct xrdp_startup_params startup_params = {0}; int pid; @@ -453,17 +452,19 @@ main(int argc, char **argv) int daemon; char text[256]; const char *pid_file = XRDP_PID_PATH "/xrdp.pid"; - int errored_argc; +#ifdef XRDP_DEBUG + int test; + for (test = 0; test < argc; test++) + { + g_writeln("Argument %i - %s", test, argv[test]); + } +#endif + g_init("xrdp"); ssl_init(); - for (test = 0; test < argc; test++) - { - DEBUG(("Argument %i - %s", test, argv[test])); - } - startup_params.xrdp_ini = XRDP_CFG_PATH "/xrdp.ini"; errored_argc = xrdp_process_params(argc, argv, &startup_params);