Use strncaseeq instead of strncasecmp
This commit is contained in:
@@ -273,7 +273,7 @@ static void load_action(settings_t *settings, char *action)
|
|||||||
|
|
||||||
for (i = 0; i < countof(actions); i++)
|
for (i = 0; i < countof(actions); i++)
|
||||||
{
|
{
|
||||||
if (strncasecmp(actions[i].name, action, strlen(actions[i].name)) == 0)
|
if (strncaseeq(actions[i].name, action, strlen(actions[i].name)))
|
||||||
{
|
{
|
||||||
int delay;
|
int delay;
|
||||||
char *config;
|
char *config;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ static bool load_trusted_cert(settings_t *settings, bool trusted)
|
|||||||
{
|
{
|
||||||
certificate_t *cert = NULL;
|
certificate_t *cert = NULL;
|
||||||
|
|
||||||
if (strcaseeq(key, "x509"))
|
if (strncaseeq(key, "x509"))
|
||||||
{
|
{
|
||||||
cert = lib->creds->create(lib->creds, CRED_CERTIFICATE,
|
cert = lib->creds->create(lib->creds, CRED_CERTIFICATE,
|
||||||
CERT_X509, BUILD_FROM_FILE, value, BUILD_END);
|
CERT_X509, BUILD_FROM_FILE, value, BUILD_END);
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ METHOD(listener_t, message, bool,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strncasecmp(this->data, "0x", 2) == 0)
|
if (strncaseeq(this->data, "0x", 2))
|
||||||
{
|
{
|
||||||
data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
|
data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
|
||||||
data = chunk_from_hex(data, NULL);
|
data = chunk_from_hex(data, NULL);
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ METHOD(listener_t, message, bool,
|
|||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
}
|
}
|
||||||
if (strncasecmp(this->data, "0x", 2) == 0)
|
if (strncaseeq(this->data, "0x", 2))
|
||||||
{
|
{
|
||||||
data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
|
data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
|
||||||
data = chunk_from_hex(data, NULL);
|
data = chunk_from_hex(data, NULL);
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ METHOD(listener_t, ike_updown, bool,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strncasecmp(this->data, "0x", 2) == 0)
|
if (strncaseeq(this->data, "0x", 2))
|
||||||
{
|
{
|
||||||
data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
|
data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
|
||||||
data = chunk_from_hex(data, NULL);
|
data = chunk_from_hex(data, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user