From 16c3bbdb8d14868644bd4df499569489721af93b Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 13 Nov 2016 08:45:57 -0800 Subject: [PATCH 1/2] Remove all tabs in sources --- sesman/chansrv/chansrv.c | 8 ++++---- sesman/chansrv/pcsc/wrapper/winscard-funcs.h | 4 ++-- xrdp/xrdp_types.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index 89040377..2d2160fc 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1407,13 +1407,13 @@ get_log_path() memcpy(cp, log_path, strlen(log_path)); memcpy(cp + strlen(log_path), "/xrdp", strlen("/xrdp") + 1); if (g_directory_exist(cp) || g_mkdir(cp)) - { + { log_path = cp; - } + } else - { + { free(cp); - } + } } } } diff --git a/sesman/chansrv/pcsc/wrapper/winscard-funcs.h b/sesman/chansrv/pcsc/wrapper/winscard-funcs.h index 0a4198a3..d28e1445 100755 --- a/sesman/chansrv/pcsc/wrapper/winscard-funcs.h +++ b/sesman/chansrv/pcsc/wrapper/winscard-funcs.h @@ -107,7 +107,7 @@ typedef LONG WINAPI (*tSCardFreeMemory)(SCARDCONTEXT hContext, LPCVOID pvMem); typedef LONG WINAPI (*tSCardLocateCardsA)(SCARDCONTEXT hContext, LPCSTR mszCards, - LPSCARD_READERSTATEA rgReaderStates, DWORD cReaders); + LPSCARD_READERSTATEA rgReaderStates, DWORD cReaders); typedef LONG WINAPI (*tSCardLocateCardsW)(SCARDCONTEXT hContext, LPCWSTR mszCards, LPSCARD_READERSTATEW rgReaderStates, DWORD cReaders); @@ -160,7 +160,7 @@ typedef LONG WINAPI typedef LONG WINAPI (*tSCardControl)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, - DWORD nOutBufferSize, LPDWORD lpBytesReturned); + DWORD nOutBufferSize, LPDWORD lpBytesReturned); typedef LONG WINAPI (*tSCardGetAttrib)(SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE pbAttr, LPDWORD pcbAttrLen); diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index 35835857..46a23ca1 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -592,7 +592,7 @@ struct xrdp_cfg_globals int ls_btn_cancel_y_pos; /* y pos for Cancel button */ int ls_btn_cancel_width; /* width of Cancel button */ int ls_btn_cancel_height; /* height of Cancel button */ - char ls_title[256]; /* loginscreen window title */ + char ls_title[256]; /* loginscreen window title */ }; struct xrdp_cfg_logging From 35b336272b5ee4e2c30d622230c6a71b03b76082 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 13 Nov 2016 08:46:08 -0800 Subject: [PATCH 2/2] Fix compilation with C++ --- sesman/chansrv/chansrv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index 2d2160fc..c7ce1f48 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1400,7 +1400,7 @@ get_log_path() log_path = g_getenv("XDG_DATA_HOME"); if (log_path != 0) { - cp = malloc(strlen(log_path) + strlen("/xrdp") + 1); + cp = g_new(char, strlen(log_path) + strlen("/xrdp") + 1); if (cp != 0) { @@ -1423,7 +1423,7 @@ get_log_path() log_path = g_getenv("HOME"); if (log_path != 0) { - cp = malloc(strlen(log_path) + strlen("/.local/share/xrdp") + 1); + cp = g_new(char, strlen(log_path) + strlen("/.local/share/xrdp") + 1); if (cp != 0) {