Use strncaseeq instead of strncasecmp

This commit is contained in:
Martin Willi
2011-01-05 16:45:59 +01:00
parent 7a3e0a6321
commit c7f7a0ba06
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ static void load_action(settings_t *settings, char *action)
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;
char *config;
+1 -1
View File
@@ -100,7 +100,7 @@ static bool load_trusted_cert(settings_t *settings, bool trusted)
{
certificate_t *cert = NULL;
if (strcaseeq(key, "x509"))
if (strncaseeq(key, "x509"))
{
cert = lib->creds->create(lib->creds, CRED_CERTIFICATE,
CERT_X509, BUILD_FROM_FILE, value, BUILD_END);
+1 -1
View File
@@ -80,7 +80,7 @@ METHOD(listener_t, message, bool,
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_from_hex(data, NULL);
+1 -1
View File
@@ -98,7 +98,7 @@ METHOD(listener_t, message, bool,
}
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_from_hex(data, NULL);
+1 -1
View File
@@ -75,7 +75,7 @@ METHOD(listener_t, ike_updown, bool,
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_from_hex(data, NULL);