Revert "Use string_is_equal"

This reverts commit 49a290c3e6.
This commit is contained in:
twinaphex 2016-10-04 10:29:32 +02:00
parent 49a290c3e6
commit eeae9a186f
3 changed files with 6 additions and 7 deletions

View file

@ -34,7 +34,6 @@
#include <streams/file_stream.h>
#include <retro_endianness.h>
#include <string/stdstring.h>
#include <compat/strl.h>
#include "libretrodb.h"
@ -228,7 +227,7 @@ int libretrodb_open(const char *path, libretrodb_t *db)
goto error;
}
if (!string_is_equal(header.magic_number, MAGIC_NUMBER))
if (strncmp(header.magic_number, MAGIC_NUMBER, sizeof(MAGIC_NUMBER)) != 0)
{
rv = -EINVAL;
goto error;
@ -265,7 +264,7 @@ static int libretrodb_find_index(libretrodb_t *db, const char *index_name,
{
libretrodb_read_index_header(db->fd, idx);
if (string_is_equal(index_name, idx->name))
if (strncmp(index_name, idx->name, strlen(idx->name)) == 0)
return 0;
offset = filestream_seek(db->fd, (ssize_t)idx->next, SEEK_CUR);