Commit c579d861 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Replace complex comparision with strcmp.

parent 00f6ee5a
...@@ -164,18 +164,9 @@ destroyBFiledataPF(void *v) ...@@ -164,18 +164,9 @@ destroyBFiledataPF(void *v)
static bool static bool
compareNamesAPF(void *v1, void *v2) compareNamesAPF(void *v1, void *v2)
{ {
aFiledataPF *afd1, *afd2; aFiledataPF *afd1 = v1, *afd2 = v2;
size_t len;
bool ret;
afd1 = ( aFiledataPF * ) v1;
afd2 = ( aFiledataPF * ) v2;
len = strlen ( afd1->name );
ret = ( len == strlen ( afd2->name ) &&
memcmp ( afd1->name, afd2->name, len ) == 0 );
return ret; return !strcmp(afd1->name, afd2->name);
} }
/***************************************************************/ /***************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment