utils: use g_str_has_prefix() instead of prefixcmp()

Remove duplicated code from MPD.
This commit is contained in:
Max Kellermann
2008-10-28 20:33:56 +01:00
parent 4a71f66256
commit 016d996131
10 changed files with 28 additions and 35 deletions

View File

@@ -261,13 +261,3 @@ void xpthread_cond_destroy(pthread_cond_t *cond)
if ((err = pthread_cond_destroy(cond)))
FATAL("failed to destroy cond: %s\n", strerror(err));
}
int prefixcmp(const char *str, const char *prefix)
{
for (; ; str++, prefix++)
if (!*prefix)
return 0;
else if (*str != *prefix)
return (unsigned char)*prefix - (unsigned char)*str;
}