/* The last #include file should be: */
#include "memdebug.h"
-
/* We use our own typedef here since some headers might lack these */
typedef PSecurityFunctionTableA (APIENTRY *INITSECURITYINTERFACE_FN_A)(VOID);
/* Pointer to SSPI dispatch table */
PSecurityFunctionTableA s_pSecFn = NULL;
-
/*
* Curl_sspi_global_init()
*
* called through the Security Service Provider Interface dispatch table.
*/
-CURLcode
-Curl_sspi_global_init(void)
+CURLcode Curl_sspi_global_init(void)
{
OSVERSIONINFO osver;
INITSECURITYINTERFACE_FN_A pInitSecurityInterface;
/* If security interface is not yet initialized try to do this */
- if(s_hSecDll == NULL) {
-
+ if(!s_hSecDll) {
/* Find out Windows version */
memset(&osver, 0, sizeof(osver));
osver.dwOSVersionInfoSize = sizeof(osver);
- if(! GetVersionEx(&osver))
+ if(!GetVersionEx(&osver))
return CURLE_FAILED_INIT;
/* Security Service Provider Interface (SSPI) functions are located in
s_hSecDll = LoadLibrary("security.dll");
else
s_hSecDll = LoadLibrary("secur32.dll");
- if(! s_hSecDll)
+ if(!s_hSecDll)
return CURLE_FAILED_INIT;
/* Get address of the InitSecurityInterfaceA function from the SSPI dll */
pInitSecurityInterface = (INITSECURITYINTERFACE_FN_A)
GetProcAddress(s_hSecDll, "InitSecurityInterfaceA");
- if(! pInitSecurityInterface)
+ if(!pInitSecurityInterface)
return CURLE_FAILED_INIT;
/* Get pointer to Security Service Provider Interface dispatch table */
s_pSecFn = pInitSecurityInterface();
- if(! s_pSecFn)
+ if(!s_pSecFn)
return CURLE_FAILED_INIT;
-
}
+
return CURLE_OK;
}
* This deinitializes the Security Service Provider Interface from libcurl.
*/
-void
-Curl_sspi_global_cleanup(void)
+void Curl_sspi_global_cleanup(void)
{
if(s_hSecDll) {
FreeLibrary(s_hSecDll);