To do this I've swapped _strnicmp with memcmp. Seemless, but does lock it to the restrictions of that function.
Signed-off-by: Jason Plum <jplum@archlinuxarm.org>
#endif
#include <assert.h>
+#include <string.h>
#include <winpr/crt.h>
#include <winpr/sspi.h>
{
if (strlen(hostname) == pattern_length)
{
- if (memcmp((void*) hostname, (void*) pattern, pattern_length) == 0)
+ if (_strnicmp( hostname, pattern, pattern_length) == 0)
return TRUE;
}
{
char* check_hostname = &hostname[strlen(hostname) - pattern_length + 1];
- if (memcmp((void*) check_hostname, (void*) &pattern[1], pattern_length - 1) == 0)
+ if (_strnicmp( check_hostname, &pattern[1], pattern_length - 1) == 0)
{
return TRUE;
}