api: fix zero-parameter C function prototypes

Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2020-10-30 06:03:21 +01:00
parent 4a575d210a
commit e630c3bec1
6 changed files with 16 additions and 16 deletions

View File

@ -287,7 +287,7 @@ AdapterEnableAll(_In_ HDEVINFO DevInfo, _In_ SP_DEVINFO_DATA_LIST *AdaptersToEna
} }
WINTUN_STATUS WINTUN_STATUS
AdapterDeleteAllOurs() AdapterDeleteAllOurs(void)
{ {
DWORD Result = ERROR_SUCCESS; DWORD Result = ERROR_SUCCESS;
HDEVINFO DevInfo = SetupDiGetClassDevsExW(&GUID_DEVCLASS_NET, NULL, NULL, DIGCF_PRESENT, NULL, NULL, NULL); HDEVINFO DevInfo = SetupDiGetClassDevsExW(&GUID_DEVCLASS_NET, NULL, NULL, DIGCF_PRESENT, NULL, NULL, NULL);
@ -328,7 +328,7 @@ AdapterDeleteAllOurs()
} }
void void
AdapterInit() AdapterInit(void)
{ {
Locale = _wcreate_locale(LC_ALL, L""); Locale = _wcreate_locale(LC_ALL, L"");
@ -350,7 +350,7 @@ AdapterInit()
} }
void void
AdapterCleanup() AdapterCleanup(void)
{ {
_free_locale(Locale); _free_locale(Locale);
} }
@ -791,7 +791,7 @@ extern VOID NTAPI
RtlGetNtVersionNumbers(_Out_opt_ DWORD *MajorVersion, _Out_opt_ DWORD *MinorVersion, _Out_opt_ DWORD *BuildNumber); RtlGetNtVersionNumbers(_Out_opt_ DWORD *MajorVersion, _Out_opt_ DWORD *MinorVersion, _Out_opt_ DWORD *BuildNumber);
static BOOL static BOOL
HaveWHQL() HaveWHQL(void)
{ {
# if defined(HAVE_EV) && defined(HAVE_WHQL) # if defined(HAVE_EV) && defined(HAVE_WHQL)
DWORD MajorVersion; DWORD MajorVersion;

View File

@ -70,13 +70,13 @@ AdapterEnableAll(_In_ HDEVINFO DevInfo, _In_ SP_DEVINFO_DATA_LIST *AdaptersToEna
* @return ERROR_SUCCESS on success; Win32 error code otherwise. * @return ERROR_SUCCESS on success; Win32 error code otherwise.
*/ */
WINTUN_STATUS WINTUN_STATUS
AdapterDeleteAllOurs(); AdapterDeleteAllOurs(void);
void void
AdapterInit(); AdapterInit(void);
void void
AdapterCleanup(); AdapterCleanup(void);
/** /**
* Wintun adapter descriptor. * Wintun adapter descriptor.

View File

@ -41,7 +41,7 @@ Bin2Hex(_In_bytecount_(Size) const void *Source, size_t Size, _Out_capcount_(Siz
} }
static WINTUN_STATUS static WINTUN_STATUS
NamespaceRuntimeInit() NamespaceRuntimeInit(void)
{ {
DWORD Result; DWORD Result;
@ -165,13 +165,13 @@ NamespaceReleaseMutex(_In_ HANDLE Mutex)
} }
void void
NamespaceInit() NamespaceInit(void)
{ {
InitializeCriticalSection(&Initializing); InitializeCriticalSection(&Initializing);
} }
void void
NamespaceCleanup() NamespaceCleanup(void)
{ {
EnterCriticalSection(&Initializing); EnterCriticalSection(&Initializing);
if (HasInitialized) if (HasInitialized)

View File

@ -15,7 +15,7 @@ void
NamespaceReleaseMutex(_In_ HANDLE Mutex); NamespaceReleaseMutex(_In_ HANDLE Mutex);
void void
NamespaceInit(); NamespaceInit(void);
void void
NamespaceCleanup(); NamespaceCleanup(void);

View File

@ -16,7 +16,7 @@ DWORD(WINAPI *NciGetConnectionName)
_Out_opt_ DWORD *OutDestNameBytes); _Out_opt_ DWORD *OutDestNameBytes);
void void
NciInit() NciInit(void)
{ {
NciModule = LoadLibraryW(L"nci.dll"); NciModule = LoadLibraryW(L"nci.dll");
if (!NciModule) if (!NciModule)
@ -28,7 +28,7 @@ NciInit()
} }
void void
NciCleanup() NciCleanup(void)
{ {
if (NciModule) if (NciModule)
FreeLibrary(NciModule); FreeLibrary(NciModule);

View File

@ -16,7 +16,7 @@ extern DWORD(WINAPI *NciGetConnectionName)(
_Out_opt_ DWORD *OutDestNameBytes); _Out_opt_ DWORD *OutDestNameBytes);
void void
NciInit(); NciInit(void);
void void
NciCleanup(); NciCleanup(void);