diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 13:11:00 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-21 13:16:53 +0100 |
commit | 70e36068a43cb6747232441ee67e609c86362aa0 (patch) | |
tree | ca05d17c538d3230ff904296fbb7625b2d7d5660 /sal/osl/w32 | |
parent | e8e093f14b698fc710930b2dead57c7d4fb63b8e (diff) |
tdf#123936 Formatting files in module sal with clang-format
Change-Id: I04a773e8fd565f57dc0eb887fb4714b6edbb35e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105699
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
Diffstat (limited to 'sal/osl/w32')
-rw-r--r-- | sal/osl/w32/file-impl.hxx | 3 | ||||
-rw-r--r-- | sal/osl/w32/file_error.hxx | 2 | ||||
-rw-r--r-- | sal/osl/w32/filetime.hxx | 15 | ||||
-rw-r--r-- | sal/osl/w32/mutex.cxx | 17 | ||||
-rw-r--r-- | sal/osl/w32/nlsupport.hxx | 2 | ||||
-rw-r--r-- | sal/osl/w32/procimpl.hxx | 5 | ||||
-rw-r--r-- | sal/osl/w32/random.cxx | 15 | ||||
-rw-r--r-- | sal/osl/w32/secimpl.hxx | 9 | ||||
-rw-r--r-- | sal/osl/w32/signal.cxx | 7 | ||||
-rw-r--r-- | sal/osl/w32/system.h | 4 |
10 files changed, 38 insertions, 41 deletions
diff --git a/sal/osl/w32/file-impl.hxx b/sal/osl/w32/file-impl.hxx index 550a22dbf6f9..3f1d2136def9 100644 --- a/sal/osl/w32/file-impl.hxx +++ b/sal/osl/w32/file-impl.hxx @@ -18,8 +18,7 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> -extern "C" oslFileHandle osl_createFileHandleFromOSHandle( - HANDLE hFile, sal_uInt32 uFlags); +extern "C" oslFileHandle osl_createFileHandleFromOSHandle(HANDLE hFile, sal_uInt32 uFlags); #endif diff --git a/sal/osl/w32/file_error.hxx b/sal/osl/w32/file_error.hxx index 714297c11eb9..4da87c132cfd 100644 --- a/sal/osl/w32/file_error.hxx +++ b/sal/osl/w32/file_error.hxx @@ -22,7 +22,7 @@ #include <osl/file.h> -oslFileError oslTranslateFileError (/*DWORD*/ unsigned long dwError); +oslFileError oslTranslateFileError(/*DWORD*/ unsigned long dwError); #endif diff --git a/sal/osl/w32/filetime.hxx b/sal/osl/w32/filetime.hxx index db21c4ca34b8..dc355591adce 100644 --- a/sal/osl/w32/filetime.hxx +++ b/sal/osl/w32/filetime.hxx @@ -17,21 +17,22 @@ #include <osl/time.h> -BOOL TimeValueToFileTime(TimeValue const * cpTimeVal, FILETIME * pFTime); +BOOL TimeValueToFileTime(TimeValue const* cpTimeVal, FILETIME* pFTime); -BOOL FileTimeToTimeValue(FILETIME const * cpFTime, TimeValue * pTimeVal); +BOOL FileTimeToTimeValue(FILETIME const* cpFTime, TimeValue* pTimeVal); -namespace osl::detail { - -inline __int64 getFiletime(FILETIME const & ft) { +namespace osl::detail +{ +inline __int64 getFiletime(FILETIME const& ft) +{ return (DWORD64(ft.dwHighDateTime) << 32) | ft.dwLowDateTime; } -inline void setFiletime(FILETIME & ft, __int64 value) { +inline void setFiletime(FILETIME& ft, __int64 value) +{ ft.dwHighDateTime = value >> 32; ft.dwLowDateTime = value & 0xFFFFFFFF; } - } #endif diff --git a/sal/osl/w32/mutex.cxx b/sal/osl/w32/mutex.cxx index 95aca0ce5cef..31a9117a8c68 100644 --- a/sal/osl/w32/mutex.cxx +++ b/sal/osl/w32/mutex.cxx @@ -33,9 +33,9 @@ oslMutex SAL_CALL osl_createMutex(void) { - CRITICAL_SECTION *pMutexImpl; + CRITICAL_SECTION* pMutexImpl; - pMutexImpl = static_cast<CRITICAL_SECTION *>(calloc(sizeof(CRITICAL_SECTION), 1)); + pMutexImpl = static_cast<CRITICAL_SECTION*>(calloc(sizeof(CRITICAL_SECTION), 1)); OSL_ASSERT(pMutexImpl); /* alloc successful? */ @@ -46,7 +46,7 @@ oslMutex SAL_CALL osl_createMutex(void) void SAL_CALL osl_destroyMutex(oslMutex Mutex) { - CRITICAL_SECTION *pMutexImpl = reinterpret_cast<CRITICAL_SECTION *>(Mutex); + CRITICAL_SECTION* pMutexImpl = reinterpret_cast<CRITICAL_SECTION*>(Mutex); if (pMutexImpl) { @@ -57,7 +57,7 @@ void SAL_CALL osl_destroyMutex(oslMutex Mutex) sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex) { - CRITICAL_SECTION *pMutexImpl = reinterpret_cast<CRITICAL_SECTION *>(Mutex); + CRITICAL_SECTION* pMutexImpl = reinterpret_cast<CRITICAL_SECTION*>(Mutex); OSL_ASSERT(Mutex); @@ -68,7 +68,7 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex) sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex) { - CRITICAL_SECTION *pMutexImpl = reinterpret_cast<CRITICAL_SECTION *>(Mutex); + CRITICAL_SECTION* pMutexImpl = reinterpret_cast<CRITICAL_SECTION*>(Mutex); OSL_ASSERT(Mutex); @@ -77,7 +77,7 @@ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex) sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex) { - CRITICAL_SECTION *pMutexImpl = reinterpret_cast<CRITICAL_SECTION *>(Mutex); + CRITICAL_SECTION* pMutexImpl = reinterpret_cast<CRITICAL_SECTION*>(Mutex); OSL_ASSERT(Mutex); @@ -89,9 +89,6 @@ sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex) /* initialized in dllentry.c */ oslMutex g_Mutex; -oslMutex * SAL_CALL osl_getGlobalMutex(void) -{ - return &g_Mutex; -} +oslMutex* SAL_CALL osl_getGlobalMutex(void) { return &g_Mutex; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/w32/nlsupport.hxx b/sal/osl/w32/nlsupport.hxx index cd09babb21d1..2d818c378b3e 100644 --- a/sal/osl/w32/nlsupport.hxx +++ b/sal/osl/w32/nlsupport.hxx @@ -14,7 +14,7 @@ #include <rtl/locale.h> -void imp_getProcessLocale(rtl_Locale ** ppLocale); +void imp_getProcessLocale(rtl_Locale** ppLocale); #endif diff --git a/sal/osl/w32/procimpl.hxx b/sal/osl/w32/procimpl.hxx index ee985e3229eb..fb1263fa78a3 100644 --- a/sal/osl/w32/procimpl.hxx +++ b/sal/osl/w32/procimpl.hxx @@ -22,9 +22,10 @@ #include <osl/process.h> -struct oslProcessImpl { +struct oslProcessImpl +{ HANDLE m_hProcess; - DWORD m_IdProcess; + DWORD m_IdProcess; }; #endif diff --git a/sal/osl/w32/random.cxx b/sal/osl/w32/random.cxx index ce495a8e3dc4..c873a8d3b5f0 100644 --- a/sal/osl/w32/random.cxx +++ b/sal/osl/w32/random.cxx @@ -21,15 +21,15 @@ int osl_get_system_random_data(char* buffer, size_t desired_len) unsigned int val; /* if unaligned fill to alignment */ - if(reinterpret_cast<uintptr_t>(buffer) & 3) + if (reinterpret_cast<uintptr_t>(buffer) & 3) { size_t len = 4 - (reinterpret_cast<size_t>(buffer) & 3); - if(len > desired_len) + if (len > desired_len) { len = desired_len; } - if(rand_s(&val)) + if (rand_s(&val)) { return 0; } @@ -38,9 +38,9 @@ int osl_get_system_random_data(char* buffer, size_t desired_len) desired_len -= len; } /* fill directly into the buffer as long as we can */ - while(desired_len >= 4) + while (desired_len >= 4) { - if(rand_s(reinterpret_cast<unsigned int*>(buffer))) + if (rand_s(reinterpret_cast<unsigned int*>(buffer))) { return 0; } @@ -51,9 +51,9 @@ int osl_get_system_random_data(char* buffer, size_t desired_len) } } /* deal with the partial int reminder to fill */ - if(desired_len) + if (desired_len) { - if(rand_s(&val)) + if (rand_s(&val)) { return 0; } @@ -62,5 +62,4 @@ int osl_get_system_random_data(char* buffer, size_t desired_len) return 1; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/w32/secimpl.hxx b/sal/osl/w32/secimpl.hxx index b1f8746f912f..7c952bb64250 100644 --- a/sal/osl/w32/secimpl.hxx +++ b/sal/osl/w32/secimpl.hxx @@ -26,12 +26,13 @@ #define USER_BUFFER_SIZE 256 -typedef struct { +typedef struct +{ HANDLE m_hProfile; HANDLE m_hToken; - sal_Unicode m_User[USER_BUFFER_SIZE]; -/* extension by fileserver login */ - NETRESOURCEW *m_pNetResource; + sal_Unicode m_User[USER_BUFFER_SIZE]; + /* extension by fileserver login */ + NETRESOURCEW* m_pNetResource; } oslSecurityImpl; #endif diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx index aa5662221c7c..dcb05beae097 100644 --- a/sal/osl/w32/signal.cxx +++ b/sal/osl/w32/signal.cxx @@ -71,7 +71,7 @@ long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP) oslSignalInfo info; info.UserSignal = lpEP->ExceptionRecord->ExceptionCode; - info.UserData = nullptr; + info.UserData = nullptr; switch (lpEP->ExceptionRecord->ExceptionCode) { @@ -102,7 +102,7 @@ long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP) oslSignalAction action; - if ( !bNested ) + if (!bNested) { bNested = true; action = callSignalHandler(&info); @@ -110,7 +110,7 @@ long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP) else action = osl_Signal_ActKillApp; - switch ( action ) + switch (action) { case osl_Signal_ActCallNextHdl: return EXCEPTION_CONTINUE_SEARCH; @@ -128,7 +128,6 @@ long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP) return EXCEPTION_CONTINUE_EXECUTION; } - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/w32/system.h b/sal/osl/w32/system.h index e1896f13e23c..921d746fd962 100644 --- a/sal/osl/w32/system.h +++ b/sal/osl/w32/system.h @@ -18,7 +18,7 @@ */ #if OSL_DEBUG_LEVEL <= 3 -# define NO_DEBUG_CRT +#define NO_DEBUG_CRT #endif #include <stdio.h> @@ -48,7 +48,7 @@ #include <ws2tcpip.h> #include <shlobj.h> #ifndef NO_DEBUG_CRT - #include <crtdbg.h> +#include <crtdbg.h> #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |