From 70b8903c503f400a6e11a0dd657ef99e634493cd Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Sat, 6 Feb 2021 09:38:50 +0100 Subject: api: implement %r format type for logging registry path Note: Once reviewed, merge with 728d6762cd95394f2541d4a3f3e7fdd17ecd8f2a Signed-off-by: Simon Rozman --- api/logger.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'api/logger.h') diff --git a/api/logger.h b/api/logger.h index 3ffda6e..6568448 100644 --- a/api/logger.h +++ b/api/logger.h @@ -24,18 +24,10 @@ _Post_equals_last_error_ DWORD LoggerLog(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Function, _In_z_ const WCHAR *LogLine); _Post_equals_last_error_ DWORD -LoggerLogV( - _In_ WINTUN_LOGGER_LEVEL Level, - _In_z_ const WCHAR *Function, - _In_z_ _Printf_format_string_ const WCHAR *Format, - _In_ va_list Args); +LoggerLogV(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Function, _In_z_ const WCHAR *Format, _In_ va_list Args); static inline _Post_equals_last_error_ DWORD -LoggerLogFmt( - _In_ WINTUN_LOGGER_LEVEL Level, - _In_z_ const WCHAR *Function, - _In_z_ _Printf_format_string_ const WCHAR *Format, - ...) +LoggerLogFmt(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Function, _In_z_ const WCHAR *Format, ...) { va_list Args; va_start(Args, Format); @@ -48,14 +40,10 @@ _Post_equals_last_error_ DWORD LoggerError(_In_ DWORD Error, _In_z_ const WCHAR *Function, _In_z_ const WCHAR *Prefix); _Post_equals_last_error_ DWORD -LoggerErrorV( - _In_ DWORD Error, - _In_z_ const WCHAR *Function, - _In_z_ _Printf_format_string_ const WCHAR *Format, - _In_ va_list Args); +LoggerErrorV(_In_ DWORD Error, _In_z_ const WCHAR *Function, _In_z_ const WCHAR *Format, _In_ va_list Args); static inline _Post_equals_last_error_ DWORD -LoggerErrorFmt(_In_ DWORD Error, _In_z_ const WCHAR *Function, _In_z_ _Printf_format_string_ const WCHAR *Format, ...) +LoggerErrorFmt(_In_ DWORD Error, _In_z_ const WCHAR *Function, _In_z_ const WCHAR *Format, ...) { va_list Args; va_start(Args, Format); @@ -65,7 +53,7 @@ LoggerErrorFmt(_In_ DWORD Error, _In_z_ const WCHAR *Function, _In_z_ _Printf_fo } static inline _Post_equals_last_error_ DWORD -LoggerLastErrorV(_In_z_ const WCHAR *Function, _In_z_ _Printf_format_string_ const WCHAR *Format, _In_ va_list Args) +LoggerLastErrorV(_In_z_ const WCHAR *Function, _In_z_ const WCHAR *Format, _In_ va_list Args) { DWORD LastError = GetLastError(); LoggerErrorV(LastError, Function, Format, Args); @@ -74,7 +62,7 @@ LoggerLastErrorV(_In_z_ const WCHAR *Function, _In_z_ _Printf_format_string_ con } static inline _Post_equals_last_error_ DWORD -LoggerLastErrorFmt(_In_z_ const WCHAR *Function, _In_z_ _Printf_format_string_ const WCHAR *Format, ...) +LoggerLastErrorFmt(_In_z_ const WCHAR *Function, _In_z_ const WCHAR *Format, ...) { va_list Args; va_start(Args, Format); -- cgit v1.2.3-59-g8ed1b